Group pageStack properties of the ApplicationWindow together

This commit is contained in:
Carl Schwan
2023-06-17 21:29:15 +02:00
parent c51a1f4851
commit 5552cd60f6

View File

@@ -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
}