2017-04-27 18:30:36 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2017-10-29 07:44:06 +00:00
|
|
|
import QtQuick 2.6
|
2017-10-29 12:44:22 +00:00
|
|
|
import QtQuick.Controls 2.2 as Controls
|
2015-07-10 07:48:28 +00:00
|
|
|
import QtQuick.Window 2.2
|
|
|
|
import QtQuick.Dialogs 1.2
|
2017-10-30 10:26:47 +00:00
|
|
|
import QtQuick.Layouts 1.2
|
QML UI: Kirigami to 2.2
When first tested this commit, especially the dive list was looking
terrible. However, after including newer SHA's from libkirigami, and
correcting lots of spacing/margin issue, a retest of this commit shows
no strange artifact any more, and the amount of warnings in the log
output is reduced significantly. So now, it appears save to
upgrade.
Notice that main.qml still uses Kirigami 2.0. and is not updated in
this commit. With version 2.2, there is a new way of theming, that
is not (yet) compatible with our current code. Blindly upgrading to
2.2 leads to a almost black dive list, wrong button colors, and
runtime errors in the log, due to the fact the direct setting from
QML Kirigami's Theme colors is not allowed any more.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-14 19:13:01 +00:00
|
|
|
import org.kde.kirigami 2.2 as Kirigami
|
2015-07-10 07:48:28 +00:00
|
|
|
import org.subsurfacedivelog.mobile 1.0
|
|
|
|
|
2017-07-10 01:47:18 +00:00
|
|
|
Kirigami.ScrollablePage {
|
2017-07-20 17:39:55 +00:00
|
|
|
objectName: "Settings"
|
2017-07-20 07:55:58 +00:00
|
|
|
id: settingsPage
|
2018-08-20 18:02:54 +00:00
|
|
|
property alias defaultCylinderModel: defaultCylinderBox.model
|
|
|
|
property alias defaultCylinderIndex: defaultCylinderBox.currentIndex
|
|
|
|
|
2017-07-20 17:39:55 +00:00
|
|
|
title: qsTr("Settings")
|
2018-02-16 10:17:20 +00:00
|
|
|
background: Rectangle { color: subsurfaceTheme.backgroundColor }
|
2017-08-03 22:47:37 +00:00
|
|
|
|
|
|
|
property real gridWidth: settingsPage.width - Kirigami.Units.gridUnit
|
2017-09-27 16:56:24 +00:00
|
|
|
property var describe: [qsTr("Undefined"),
|
|
|
|
qsTr("Incorrect username/password combination"),
|
|
|
|
qsTr("Credentials need to be verified"),
|
|
|
|
qsTr("Credentials verified"),
|
|
|
|
qsTr("No cloud mode")]
|
2017-07-10 01:47:18 +00:00
|
|
|
|
|
|
|
ColumnLayout {
|
2017-08-03 22:47:37 +00:00
|
|
|
width: gridWidth
|
2017-09-27 16:56:24 +00:00
|
|
|
GridLayout {
|
|
|
|
id: cloudSetting
|
|
|
|
columns: 3
|
|
|
|
Layout.bottomMargin: Kirigami.Units.gridUnit
|
|
|
|
|
|
|
|
Kirigami.Heading {
|
|
|
|
text: qsTr("Cloud status")
|
|
|
|
color: subsurfaceTheme.textColor
|
|
|
|
level: 4
|
|
|
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
|
|
|
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
|
|
|
Layout.columnSpan: 3
|
|
|
|
}
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.Label {
|
2017-09-27 16:56:24 +00:00
|
|
|
text: qsTr("Email")
|
|
|
|
Layout.alignment: Qt.AlignRight
|
2017-09-29 07:15:43 +00:00
|
|
|
Layout.preferredWidth: gridWidth * 0.15
|
2017-09-27 16:56:24 +00:00
|
|
|
Layout.preferredHeight: Kirigami.Units.gridUnit * 2
|
|
|
|
}
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.Label {
|
2018-07-05 18:37:53 +00:00
|
|
|
text: prefs.credentialStatus === SsrfPrefs.CS_NOCLOUD ? qsTr("Not applicable") : prefs.cloudUserName
|
2017-09-27 16:56:24 +00:00
|
|
|
Layout.alignment: Qt.AlignRight
|
2017-09-29 07:15:43 +00:00
|
|
|
Layout.preferredWidth: gridWidth * 0.60
|
2017-09-27 16:56:24 +00:00
|
|
|
Layout.preferredHeight: Kirigami.Units.gridUnit * 2
|
|
|
|
}
|
|
|
|
SsrfButton {
|
2017-09-29 07:15:43 +00:00
|
|
|
id: changeCloudSettings
|
2017-09-27 16:56:24 +00:00
|
|
|
Layout.alignment: Qt.AlignRight
|
|
|
|
text: qsTr("Change")
|
|
|
|
onClicked: {
|
2018-06-18 08:53:08 +00:00
|
|
|
prefs.cancelCredentialsPinSetup()
|
2017-09-27 16:56:24 +00:00
|
|
|
rootItem.returnTopPage()
|
|
|
|
}
|
|
|
|
}
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.Label {
|
2017-09-27 16:56:24 +00:00
|
|
|
text: qsTr("Status")
|
|
|
|
Layout.alignment: Qt.AlignRight
|
2017-09-29 07:15:43 +00:00
|
|
|
Layout.preferredWidth: gridWidth * 0.15
|
2017-09-27 16:56:24 +00:00
|
|
|
Layout.preferredHeight: Kirigami.Units.gridUnit * 2
|
|
|
|
}
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.Label {
|
2018-06-13 16:06:11 +00:00
|
|
|
text: describe[prefs.credentialStatus]
|
2017-09-27 16:56:24 +00:00
|
|
|
Layout.alignment: Qt.AlignRight
|
2017-09-29 07:15:43 +00:00
|
|
|
Layout.preferredWidth: gridWidth * 0.60
|
2017-09-27 16:56:24 +00:00
|
|
|
Layout.preferredHeight: Kirigami.Units.gridUnit * 2
|
|
|
|
}
|
2017-07-20 17:39:55 +00:00
|
|
|
}
|
2017-09-27 16:56:24 +00:00
|
|
|
|
2017-07-20 17:39:55 +00:00
|
|
|
Rectangle {
|
|
|
|
color: subsurfaceTheme.darkerPrimaryColor
|
|
|
|
height: 1
|
|
|
|
opacity: 0.5
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
GridLayout {
|
2017-07-20 17:39:55 +00:00
|
|
|
id: themeSettings
|
2017-07-22 10:04:27 +00:00
|
|
|
columns: 3
|
2017-07-20 17:39:55 +00:00
|
|
|
Layout.bottomMargin: Kirigami.Units.gridUnit
|
2015-07-10 07:48:28 +00:00
|
|
|
|
2017-07-10 03:53:16 +00:00
|
|
|
Kirigami.Heading {
|
|
|
|
text: qsTr("Theme")
|
|
|
|
color: subsurfaceTheme.textColor
|
|
|
|
level: 4
|
|
|
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
|
|
|
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
2017-07-22 10:04:27 +00:00
|
|
|
Layout.columnSpan: 3
|
2017-06-23 20:06:17 +00:00
|
|
|
}
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.Label {
|
2017-07-20 07:55:58 +00:00
|
|
|
text: qsTr("Blue")
|
|
|
|
color: subsurfaceTheme.textColor
|
|
|
|
rightPadding: Kirigami.Units.gridUnit
|
2017-07-23 10:44:52 +00:00
|
|
|
Layout.preferredWidth: gridWidth * 0.15
|
2017-06-24 01:08:47 +00:00
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
Row {
|
2017-07-22 20:06:48 +00:00
|
|
|
Layout.preferredWidth: gridWidth * 0.6
|
2017-07-10 03:53:16 +00:00
|
|
|
Rectangle {
|
|
|
|
id: blueRect
|
|
|
|
color: subsurfaceTheme.blueBackgroundColor
|
|
|
|
border.color: "black"
|
2017-07-22 09:54:21 +00:00
|
|
|
width: sampleRegularBlue.width + Kirigami.Units.gridUnit
|
2017-07-10 03:53:16 +00:00
|
|
|
height: Kirigami.Units.gridUnit * 2
|
|
|
|
Text {
|
|
|
|
id: sampleRegularBlue
|
|
|
|
text: qsTr("regular text")
|
|
|
|
color: subsurfaceTheme.blueTextColor
|
|
|
|
anchors {
|
|
|
|
horizontalCenter: parent.horizontalCenter
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Rectangle {
|
|
|
|
color: subsurfaceTheme.bluePrimaryColor
|
|
|
|
border.color: "black"
|
2017-07-22 09:54:21 +00:00
|
|
|
width: sampleHighlightBlue.width + Kirigami.Units.gridUnit
|
2017-07-10 03:53:16 +00:00
|
|
|
height: Kirigami.Units.gridUnit * 2
|
|
|
|
Text {
|
|
|
|
id: sampleHighlightBlue
|
|
|
|
text: qsTr("Highlight")
|
|
|
|
color: subsurfaceTheme.bluePrimaryTextColor
|
|
|
|
anchors {
|
|
|
|
horizontalCenter: parent.horizontalCenter
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
2017-06-24 01:08:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-07-24 18:04:47 +00:00
|
|
|
SsrfSwitch {
|
2017-07-23 10:44:52 +00:00
|
|
|
id: blueButton
|
|
|
|
Layout.preferredWidth: gridWidth * 0.25
|
2017-07-20 07:55:58 +00:00
|
|
|
checked: subsurfaceTheme.currentTheme === "Blue"
|
2017-07-23 10:44:52 +00:00
|
|
|
enabled: subsurfaceTheme.currentTheme !== "Blue"
|
2017-07-10 03:53:16 +00:00
|
|
|
onClicked: {
|
2017-07-20 07:55:58 +00:00
|
|
|
blueTheme()
|
2018-06-13 16:06:11 +00:00
|
|
|
prefs.theme = subsurfaceTheme.currentTheme
|
2018-06-17 15:56:07 +00:00
|
|
|
manager.savePreferences()
|
2017-07-10 03:53:16 +00:00
|
|
|
}
|
2017-07-08 17:17:10 +00:00
|
|
|
}
|
2017-07-20 07:55:58 +00:00
|
|
|
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.Label {
|
2017-07-23 10:44:52 +00:00
|
|
|
id: pinkLabel
|
2017-07-20 07:55:58 +00:00
|
|
|
text: qsTr("Pink")
|
|
|
|
rightPadding: Kirigami.Units.gridUnit
|
2017-07-23 10:44:52 +00:00
|
|
|
Layout.preferredWidth: gridWidth * 0.15
|
2017-07-20 07:55:58 +00:00
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
Row {
|
2017-07-23 10:44:52 +00:00
|
|
|
Layout.preferredWidth: gridWidth * 0.6
|
2017-07-10 03:53:16 +00:00
|
|
|
Rectangle {
|
|
|
|
id: pinkRect
|
|
|
|
color: subsurfaceTheme.pinkBackgroundColor
|
|
|
|
border.color: "black"
|
2017-07-22 09:54:21 +00:00
|
|
|
width: sampleRegularPink.width + Kirigami.Units.gridUnit
|
2017-07-10 03:53:16 +00:00
|
|
|
height: Kirigami.Units.gridUnit * 2
|
|
|
|
Text {
|
|
|
|
id: sampleRegularPink
|
|
|
|
text: qsTr("regular text")
|
|
|
|
color: subsurfaceTheme.pinkTextColor
|
|
|
|
anchors {
|
|
|
|
horizontalCenter: parent.horizontalCenter
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
2017-06-24 01:08:47 +00:00
|
|
|
}
|
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
Rectangle {
|
|
|
|
color: subsurfaceTheme.pinkPrimaryColor
|
|
|
|
border.color: "black"
|
2017-07-22 09:54:21 +00:00
|
|
|
width: sampleHighlightPink.width + Kirigami.Units.gridUnit
|
2017-07-10 03:53:16 +00:00
|
|
|
height: Kirigami.Units.gridUnit * 2
|
|
|
|
Text {
|
|
|
|
id: sampleHighlightPink
|
|
|
|
text: qsTr("Highlight")
|
|
|
|
color: subsurfaceTheme.pinkPrimaryTextColor
|
|
|
|
anchors {
|
|
|
|
horizontalCenter: parent.horizontalCenter
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
2017-06-24 01:08:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-07-22 09:54:21 +00:00
|
|
|
|
2017-07-24 18:04:47 +00:00
|
|
|
SsrfSwitch {
|
2017-07-23 10:44:52 +00:00
|
|
|
id: pinkButton
|
|
|
|
Layout.preferredWidth: gridWidth * 0.25
|
2017-07-20 07:55:58 +00:00
|
|
|
checked: subsurfaceTheme.currentTheme === "Pink"
|
2017-07-23 10:44:52 +00:00
|
|
|
enabled: subsurfaceTheme.currentTheme !== "Pink"
|
2017-07-10 03:53:16 +00:00
|
|
|
onClicked: {
|
2017-07-20 07:55:58 +00:00
|
|
|
pinkTheme()
|
2018-06-13 16:06:11 +00:00
|
|
|
prefs.theme = subsurfaceTheme.currentTheme
|
2018-06-17 15:56:07 +00:00
|
|
|
manager.savePreferences()
|
2017-07-10 03:53:16 +00:00
|
|
|
}
|
2017-07-08 17:17:10 +00:00
|
|
|
}
|
2017-07-20 07:55:58 +00:00
|
|
|
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.Label {
|
2017-07-20 07:55:58 +00:00
|
|
|
text: qsTr("Dark")
|
|
|
|
color: subsurfaceTheme.textColor
|
|
|
|
rightPadding: Kirigami.Units.gridUnit
|
2017-07-23 10:44:52 +00:00
|
|
|
Layout.preferredWidth: gridWidth * 0.15
|
2017-07-20 07:55:58 +00:00
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
Row {
|
2017-07-23 10:44:52 +00:00
|
|
|
Layout.preferredWidth: gridWidth * 0.6
|
2017-07-10 03:53:16 +00:00
|
|
|
Rectangle {
|
|
|
|
id: blackRect
|
|
|
|
color: subsurfaceTheme.darkBackgroundColor
|
|
|
|
border.color: "black"
|
2017-07-22 09:54:21 +00:00
|
|
|
width: sampleRegularDark.width + Kirigami.Units.gridUnit
|
2017-07-10 03:53:16 +00:00
|
|
|
height: Kirigami.Units.gridUnit * 2
|
|
|
|
Text {
|
|
|
|
id: sampleRegularDark
|
|
|
|
text: qsTr("regular text")
|
|
|
|
color: subsurfaceTheme.darkTextColor
|
|
|
|
anchors {
|
|
|
|
horizontalCenter: parent.horizontalCenter
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
2017-06-24 01:08:47 +00:00
|
|
|
}
|
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
Rectangle {
|
|
|
|
color: subsurfaceTheme.darkPrimaryColor
|
|
|
|
border.color: "black"
|
2017-07-22 09:54:21 +00:00
|
|
|
width: sampleHighlightDark.width + Kirigami.Units.gridUnit
|
2017-07-10 03:53:16 +00:00
|
|
|
height: Kirigami.Units.gridUnit * 2
|
|
|
|
Text {
|
|
|
|
id: sampleHighlightDark
|
|
|
|
text: qsTr("Highlight")
|
|
|
|
color: subsurfaceTheme.darkPrimaryTextColor
|
|
|
|
anchors {
|
|
|
|
horizontalCenter: parent.horizontalCenter
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
2017-06-24 01:08:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-07-24 18:04:47 +00:00
|
|
|
SsrfSwitch {
|
2017-07-23 10:44:52 +00:00
|
|
|
id: darkButton
|
|
|
|
Layout.preferredWidth: gridWidth * 0.25
|
2017-07-20 07:55:58 +00:00
|
|
|
checked: subsurfaceTheme.currentTheme === "Dark"
|
2017-07-23 10:44:52 +00:00
|
|
|
enabled: subsurfaceTheme.currentTheme !== "Dark"
|
2017-07-20 07:55:58 +00:00
|
|
|
onClicked: {
|
|
|
|
darkTheme()
|
2018-06-13 16:06:11 +00:00
|
|
|
prefs.theme = subsurfaceTheme.currentTheme
|
2018-06-17 15:56:07 +00:00
|
|
|
manager.savePreferences()
|
2017-07-20 07:55:58 +00:00
|
|
|
}
|
|
|
|
}
|
2017-06-24 01:08:47 +00:00
|
|
|
}
|
2017-07-24 18:04:47 +00:00
|
|
|
|
2017-07-20 17:39:55 +00:00
|
|
|
Rectangle {
|
|
|
|
color: subsurfaceTheme.darkerPrimaryColor
|
|
|
|
height: 1
|
|
|
|
opacity: 0.5
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
GridLayout {
|
|
|
|
id: gpsPrefs
|
|
|
|
columns: 2
|
|
|
|
width: parent.width
|
2017-06-23 20:06:17 +00:00
|
|
|
|
2017-07-10 03:53:16 +00:00
|
|
|
Kirigami.Heading {
|
|
|
|
text: qsTr("Subsurface GPS data webservice")
|
|
|
|
color: subsurfaceTheme.textColor
|
|
|
|
level: 4
|
|
|
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
|
|
|
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
|
|
|
Layout.columnSpan: 2
|
|
|
|
}
|
2015-11-14 01:14:22 +00:00
|
|
|
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.Label {
|
2017-07-10 03:53:16 +00:00
|
|
|
text: qsTr("Distance threshold (meters)")
|
|
|
|
Layout.alignment: Qt.AlignRight
|
2017-09-29 07:15:43 +00:00
|
|
|
Layout.preferredWidth: gridWidth * 0.75
|
2017-07-10 03:53:16 +00:00
|
|
|
}
|
2015-11-14 17:10:06 +00:00
|
|
|
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.TextField {
|
2017-07-10 03:53:16 +00:00
|
|
|
id: distanceThreshold
|
2018-06-13 16:06:11 +00:00
|
|
|
text: prefs.distanceThreshold
|
2017-07-22 10:04:27 +00:00
|
|
|
Layout.preferredWidth: gridWidth * 0.25
|
2017-07-20 19:53:42 +00:00
|
|
|
onEditingFinished: {
|
2018-06-13 16:06:11 +00:00
|
|
|
prefs.distanceThreshold = distanceThreshold.text
|
2018-06-17 15:56:07 +00:00
|
|
|
manager.savePreferences()
|
2017-07-20 19:53:42 +00:00
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
}
|
2015-11-14 17:10:06 +00:00
|
|
|
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.Label {
|
2017-07-10 03:53:16 +00:00
|
|
|
text: qsTr("Time threshold (minutes)")
|
|
|
|
Layout.alignment: Qt.AlignRight
|
2017-07-22 10:04:27 +00:00
|
|
|
Layout.preferredWidth: gridWidth * 0.75
|
2017-07-10 03:53:16 +00:00
|
|
|
}
|
2015-11-14 17:10:06 +00:00
|
|
|
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.TextField {
|
2017-07-10 03:53:16 +00:00
|
|
|
id: timeThreshold
|
2018-06-13 16:06:11 +00:00
|
|
|
text: prefs.timeThreshold
|
2017-07-22 10:04:27 +00:00
|
|
|
Layout.preferredWidth: gridWidth * 0.25
|
2017-07-20 19:53:42 +00:00
|
|
|
onEditingFinished: {
|
2018-06-13 16:06:11 +00:00
|
|
|
prefs.timeThreshold = timeThreshold.text
|
2018-06-17 15:56:07 +00:00
|
|
|
manager.savePreferences()
|
2017-07-20 19:53:42 +00:00
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
}
|
2015-11-14 17:10:06 +00:00
|
|
|
|
2017-07-19 18:57:12 +00:00
|
|
|
}
|
2018-08-20 18:02:54 +00:00
|
|
|
Rectangle {
|
|
|
|
color: subsurfaceTheme.darkerPrimaryColor
|
|
|
|
height: 1
|
|
|
|
opacity: 0.5
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
|
|
|
GridLayout {
|
|
|
|
id: defaultCylinder
|
|
|
|
columns: 2
|
|
|
|
width: parent.width - Kirigami.Units.gridUnit
|
|
|
|
|
|
|
|
Kirigami.Heading {
|
|
|
|
text: qsTr("Default Cylinder")
|
|
|
|
color: subsurfaceTheme.textColor
|
|
|
|
level: 4
|
|
|
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
|
|
|
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
|
|
|
Layout.columnSpan: 2
|
|
|
|
}
|
|
|
|
Controls.Label {
|
|
|
|
Layout.alignment: Qt.AlignRight
|
|
|
|
text: qsTr("Cylinder:")
|
|
|
|
font.pointSize: subsurfaceTheme.smallPointSize
|
|
|
|
}
|
|
|
|
Controls.ComboBox {
|
|
|
|
id: defaultCylinderBox
|
|
|
|
flat: true
|
|
|
|
inputMethodHints: Qt.ImhNoPredictiveText
|
|
|
|
Layout.fillWidth: true
|
|
|
|
onActivated: {
|
|
|
|
general.set_default_cylinder(defaultCylinderBox.currentText)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-20 19:19:26 +00:00
|
|
|
Rectangle {
|
|
|
|
color: subsurfaceTheme.darkerPrimaryColor
|
|
|
|
height: 1
|
|
|
|
opacity: 0.5
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
2017-07-19 14:35:46 +00:00
|
|
|
GridLayout {
|
|
|
|
id: developer
|
2017-07-22 10:04:27 +00:00
|
|
|
columns: 2
|
2017-07-19 14:35:46 +00:00
|
|
|
width: parent.width - Kirigami.Units.gridUnit
|
|
|
|
Kirigami.Heading {
|
|
|
|
text: qsTr("Developer")
|
|
|
|
color: subsurfaceTheme.textColor
|
|
|
|
level: 4
|
|
|
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
|
|
|
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
2017-07-22 10:04:27 +00:00
|
|
|
Layout.columnSpan: 2
|
2017-07-19 14:35:46 +00:00
|
|
|
}
|
|
|
|
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.Label {
|
2017-07-20 18:47:17 +00:00
|
|
|
text: qsTr("Display Developer menu")
|
2017-07-22 10:04:27 +00:00
|
|
|
Layout.preferredWidth: gridWidth * 0.75
|
2017-07-20 18:47:17 +00:00
|
|
|
}
|
2017-07-24 18:04:47 +00:00
|
|
|
SsrfSwitch {
|
2017-07-19 14:35:46 +00:00
|
|
|
id: developerButton
|
2018-06-13 16:06:11 +00:00
|
|
|
checked: prefs.developer
|
2017-07-22 10:04:27 +00:00
|
|
|
Layout.preferredWidth: gridWidth * 0.25
|
2017-07-19 14:35:46 +00:00
|
|
|
onClicked: {
|
2018-06-13 16:06:11 +00:00
|
|
|
prefs.developer = checked
|
2017-08-03 22:30:32 +00:00
|
|
|
}
|
2017-07-19 14:35:46 +00:00
|
|
|
}
|
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
Item {
|
|
|
|
height: Kirigami.Units.gridUnit * 6
|
2017-07-10 01:08:36 +00:00
|
|
|
}
|
2017-07-10 01:47:18 +00:00
|
|
|
}
|
2015-07-10 07:48:28 +00:00
|
|
|
}
|