mirror of https://github.com/KDE/kasts.git
Also handle opening the settings dialog through pushPage()
This commit is contained in:
parent
188c1d08e4
commit
e6052dbbba
|
@ -49,10 +49,7 @@ Kirigami.NavigationTabBar {
|
|||
text: i18n("Settings")
|
||||
checked: "SettingsPage" === kastsMainWindow.currentPage
|
||||
onTriggered: {
|
||||
applicationWindow().pageStack.clear()
|
||||
applicationWindow().pageStack.push("qrc:/SettingsPage.qml", {}, {
|
||||
title: i18n("Settings")
|
||||
})
|
||||
pushPage("SettingsPage")
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -62,10 +62,17 @@ Kirigami.ApplicationWindow {
|
|||
}
|
||||
}
|
||||
function pushPage(page) {
|
||||
pageStack.clear();
|
||||
pageStack.layers.clear();
|
||||
pageStack.push(getPage(page));
|
||||
currentPage = page;
|
||||
if (page === "SettingsPage") {
|
||||
pageStack.layers.clear()
|
||||
pageStack.pushDialogLayer("qrc:/SettingsPage.qml", {}, {
|
||||
title: i18n("Settings")
|
||||
})
|
||||
} else {
|
||||
pageStack.clear();
|
||||
pageStack.layers.clear();
|
||||
pageStack.push(getPage(page));
|
||||
currentPage = page;
|
||||
}
|
||||
}
|
||||
|
||||
Settings {
|
||||
|
@ -249,10 +256,7 @@ Kirigami.ApplicationWindow {
|
|||
checked: currentPage == "SettingsPage"
|
||||
onClicked: {
|
||||
checked = false;
|
||||
kastsMainWindow.pageStack.layers.clear()
|
||||
kastsMainWindow.pageStack.pushDialogLayer("qrc:/SettingsPage.qml", {}, {
|
||||
title: i18n("Settings")
|
||||
})
|
||||
pushPage("SettingsPage")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue