QML UI: move theme setting into preferences

And reorganize settings and preferences a bit.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-06-23 13:06:17 -07:00
parent dac9ce578b
commit 694e833f90
2 changed files with 52 additions and 38 deletions

View file

@ -40,6 +40,39 @@ Kirigami.Page {
Layout.columnSpan: 2 Layout.columnSpan: 2
} }
Kirigami.Heading {
text: qsTr("Theme")
level: 3
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
Layout.columnSpan: 2
}
RadioButton {
text: qsTr("Blue")
checked: subsurfaceTheme.currentTheme === "Blue"
Layout.columnSpan: 2
onClicked: {
blueTheme()
}
}
RadioButton {
text: qsTr("Pink")
checked: subsurfaceTheme.currentTheme === "Pink"
Layout.columnSpan: 2
onClicked: {
pinkTheme()
}
}
RadioButton {
text: qsTr("Dark")
checked: subsurfaceTheme.currentTheme === "Dark"
Layout.columnSpan: 2
onClicked: {
darkTheme()
}
}
Kirigami.Heading { Kirigami.Heading {
text: qsTr("Subsurface GPS data webservice") text: qsTr("Subsurface GPS data webservice")
level: 3 level: 3

View file

@ -128,6 +128,8 @@ Kirigami.ApplicationWindow {
globalDrawer.close() globalDrawer.close()
} }
}, },
Kirigami.Action {
text: qsTr("Settings")
Kirigami.Action { Kirigami.Action {
text: qsTr("Cloud credentials") text: qsTr("Cloud credentials")
onTriggered: { onTriggered: {
@ -138,9 +140,16 @@ Kirigami.ApplicationWindow {
} else { } else {
manager.startPageText = "Enter valid cloud storage credentials" manager.startPageText = "Enter valid cloud storage credentials"
} }
manager.credentialStatus = QMLManager.UNKNOWN manager.credentialStatus = QMLManager.UNKNOWN
} }
}
Kirigami.Action {
text: qsTr("Preferences")
onTriggered: {
stackView.push(prefsWindow)
detailsWindow.endEditMode()
}
}
}, },
Kirigami.Action { Kirigami.Action {
text: qsTr("Manage dives") text: qsTr("Manage dives")
@ -235,13 +244,6 @@ Kirigami.ApplicationWindow {
manager.clearGpsData(); manager.clearGpsData();
} }
} }
Kirigami.Action {
text: qsTr("Preferences")
onTriggered: {
stackView.push(prefsWindow)
detailsWindow.endEditMode()
}
}
}, },
Kirigami.Action { Kirigami.Action {
text: qsTr("Developer") text: qsTr("Developer")
@ -252,27 +254,6 @@ Kirigami.ApplicationWindow {
} }
} }
Kirigami.Action {
text: qsTr("Switch to pink theme")
onTriggered: {
pinkTheme()
}
}
Kirigami.Action {
text: qsTr("Switch to blue theme")
onTriggered: {
blueTheme()
}
}
Kirigami.Action {
text: qsTr("Switch to dark theme")
onTriggered: {
darkTheme()
}
}
Kirigami.Action { Kirigami.Action {
text: qsTr("Theme information") text: qsTr("Theme information")
onTriggered: { onTriggered: {