From 5552cd60f64e5de639f923ea7a590951f89fe77e Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Sat, 17 Jun 2023 21:29:15 +0200 Subject: [PATCH] Group pageStack properties of the ApplicationWindow together --- src/qml/main.qml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/qml/main.qml b/src/qml/main.qml index c7e88cbde..c3897fc45 100644 --- a/src/qml/main.qml +++ b/src/qml/main.qml @@ -17,19 +17,26 @@ Kirigami.ApplicationWindow { property int columnWidth: Kirigami.Units.gridUnit * 13 + property RoomList.Page roomListPage + property bool roomListLoaded: false + + property RoomPage roomPage + minimumWidth: Kirigami.Units.gridUnit * 20 minimumHeight: Kirigami.Units.gridUnit * 15 visible: false // Will be overridden in Component.onCompleted wideScreen: width > columnWidth * 5 - pageStack.initialPage: LoadingPage {} - pageStack.globalToolBar.canContainHandles: true - - property RoomList.Page roomListPage - property bool roomListLoaded: false - - property RoomPage roomPage + pageStack { + initialPage: LoadingPage {} + globalToolBar.canContainHandles: true + defaultColumnWidth: roomListPage ? roomListPage.currentWidth : 0 + globalToolBar { + style: Kirigami.ApplicationHeaderStyle.ToolBar + showNavigationButtons: pageStack.currentIndex > 0 || pageStack.layers.depth > 1 ? Kirigami.ApplicationHeaderStyle.ShowBackButton : 0 + } + } Connections { target: root.quitAction @@ -152,10 +159,6 @@ Kirigami.ApplicationWindow { handleVisible: enabled } - pageStack.defaultColumnWidth: roomListPage ? roomListPage.currentWidth : 0 - pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.ToolBar - pageStack.globalToolBar.showNavigationButtons: pageStack.currentIndex > 0 || pageStack.layers.depth > 1 ? Kirigami.ApplicationHeaderStyle.ShowBackButton : 0 - Dialog.ConfirmLogout { id: confirmLogoutDialog }