mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
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:
parent
dac9ce578b
commit
694e833f90
2 changed files with 52 additions and 38 deletions
|
@ -40,6 +40,39 @@ Kirigami.Page {
|
|||
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 {
|
||||
text: qsTr("Subsurface GPS data webservice")
|
||||
level: 3
|
||||
|
|
|
@ -129,17 +129,26 @@ Kirigami.ApplicationWindow {
|
|||
}
|
||||
},
|
||||
Kirigami.Action {
|
||||
text: qsTr("Cloud credentials")
|
||||
onTriggered: {
|
||||
returnTopPage()
|
||||
oldStatus = manager.credentialStatus
|
||||
if (diveList.numDives > 0) {
|
||||
manager.startPageText = "Enter different credentials or return to dive list"
|
||||
} else {
|
||||
manager.startPageText = "Enter valid cloud storage credentials"
|
||||
text: qsTr("Settings")
|
||||
Kirigami.Action {
|
||||
text: qsTr("Cloud credentials")
|
||||
onTriggered: {
|
||||
returnTopPage()
|
||||
oldStatus = manager.credentialStatus
|
||||
if (diveList.numDives > 0) {
|
||||
manager.startPageText = "Enter different credentials or return to dive list"
|
||||
} else {
|
||||
manager.startPageText = "Enter valid cloud storage credentials"
|
||||
}
|
||||
manager.credentialStatus = QMLManager.UNKNOWN
|
||||
}
|
||||
}
|
||||
Kirigami.Action {
|
||||
text: qsTr("Preferences")
|
||||
onTriggered: {
|
||||
stackView.push(prefsWindow)
|
||||
detailsWindow.endEditMode()
|
||||
}
|
||||
|
||||
manager.credentialStatus = QMLManager.UNKNOWN
|
||||
}
|
||||
},
|
||||
Kirigami.Action {
|
||||
|
@ -235,13 +244,6 @@ Kirigami.ApplicationWindow {
|
|||
manager.clearGpsData();
|
||||
}
|
||||
}
|
||||
Kirigami.Action {
|
||||
text: qsTr("Preferences")
|
||||
onTriggered: {
|
||||
stackView.push(prefsWindow)
|
||||
detailsWindow.endEditMode()
|
||||
}
|
||||
}
|
||||
},
|
||||
Kirigami.Action {
|
||||
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 {
|
||||
text: qsTr("Theme information")
|
||||
onTriggered: {
|
||||
|
|
Loading…
Reference in a new issue