Fix kf6 globaldrawer loading issue

This commit is contained in:
Bart De Vries 2023-04-25 14:35:09 +02:00
parent ef627c047e
commit e20509f621
1 changed files with 24 additions and 20 deletions

View File

@ -124,11 +124,11 @@ Kirigami.ApplicationWindow {
}
}
globalDrawer: sidebar.item
Loader {
id: sidebar
active: !Kirigami.Settings.isMobile || kastsMainWindow.isWidescreen
sourceComponent: Kirigami.OverlayDrawer {
property bool showGlobalDrawer: !Kirigami.Settings.isMobile || kastsMainWindow.isWidescreen
globalDrawer: showGlobalDrawer ? myGlobalDrawer : null
property Kirigami.OverlayDrawer myGlobalDrawer: Kirigami.OverlayDrawer {
id: drawer
modal: false
closePolicy: Controls.Popup.NoAutoClose
@ -138,7 +138,7 @@ Kirigami.ApplicationWindow {
readonly property real widescreenBigWidth: Kirigami.Units.gridUnit * 10
readonly property int buttonDisplayMode: kastsMainWindow.isWidescreen ? Kirigami.NavigationTabButton.TextBesideIcon : Kirigami.NavigationTabButton.IconOnly
width: kastsMainWindow.isWidescreen ? widescreenBigWidth : pinnedWidth
width: showGlobalDrawer ? (kastsMainWindow.isWidescreen ? widescreenBigWidth : pinnedWidth) : 0
Kirigami.Theme.colorSet: Kirigami.Theme.Window
Kirigami.Theme.inherit: false
@ -148,7 +148,11 @@ Kirigami.ApplicationWindow {
topPadding: 0
bottomPadding: 0
contentItem: ColumnLayout {
contentItem: Loader {
id: sidebarColumn
active: showGlobalDrawer
sourceComponent: ColumnLayout {
spacing: 0
Controls.ToolBar {