Verified Commit b8b4db78 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Improve applicationHeader behaviour

parent 5d84b60e
......@@ -35,13 +35,7 @@ import org.kde.kirigami 2.6 as Kirigami
Kirigami.AboutPage {
aboutData: cameraAboutData
onIsCurrentPageChanged: {
if (isCurrentPage)
applicationWindow().pageStack.globalToolBar.style = Kirigami.ApplicationHeaderStyle.Auto
else
applicationWindow().pageStack.globalToolBar.style = applicationWindow().headerStyle
}
globalToolBarStyle: Kirigami.Settings.isMobile ? Kirigami.ApplicationHeaderStyle.Breadcrumb : Kirigami.ApplicationHeaderStyle.ToolBar
contextualActions: [
Kirigami.Action {
......
......@@ -58,6 +58,9 @@ Kirigami.Page {
bottomPadding: 0
topPadding: 0
globalToolBarStyle: Kirigami.Settings.isMobile ? Kirigami.ApplicationHeaderStyle.None : Kirigami.ApplicationHeaderStyle.ToolBar
onIsCurrentPageChanged: isCurrentPage && pageStack.depth > 1 && pageStack.pop()
leftAction: Kirigami.Action {
id: switchModeAction
text: i18n("Switch mode")
......
......@@ -45,8 +45,6 @@ import QtMultimedia 5.8
Kirigami.ApplicationWindow {
id: root
readonly property int headerStyle: Kirigami.Settings.isMobile ? Kirigami.ApplicationHeaderStyle.None : Kirigami.ApplicationHeaderStyle.ToolBar
Settings {
id: settings
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment