mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: move location services to GPS menu
Move the location services switch to the GPS menu, indicate both with icon and text if the service is active or not. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This commit is contained in:
parent
3b3f6b67f5
commit
d51fe03bd9
3 changed files with 10 additions and 35 deletions
|
@ -308,41 +308,6 @@ Kirigami.ScrollablePage {
|
|||
}
|
||||
}
|
||||
|
||||
Kirigami.Label {
|
||||
text: qsTr("Run location service")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
Layout.preferredWidth: gridWidth * 0.75
|
||||
}
|
||||
Switch {
|
||||
id: locationButton
|
||||
Layout.preferredWidth: gridWidth * 0.25
|
||||
visible: manager.locationServiceAvailable
|
||||
checked: manager.locationServiceEnabled
|
||||
onClicked: {
|
||||
manager.locationServiceEnabled = checked
|
||||
}
|
||||
indicator: Rectangle {
|
||||
implicitWidth: Kirigami.Units.largeSpacing * 3
|
||||
implicitHeight: Kirigami.Units.largeSpacing
|
||||
x: locationButton.leftPadding
|
||||
y: parent.height / 2 - height / 2
|
||||
radius: Kirigami.Units.largeSpacing * 0.5
|
||||
color: locationButton.checked ?
|
||||
subsurfaceTheme.lightPrimaryColor : subsurfaceTheme.backgroundColor
|
||||
border.color: subsurfaceTheme.darkerPrimaryColor
|
||||
|
||||
Rectangle {
|
||||
x: locationButton.checked ? parent.width - width : 0
|
||||
y: parent.height / 2 - height / 2
|
||||
width: Kirigami.Units.largeSpacing * 1.5
|
||||
height: Kirigami.Units.largeSpacing * 1.5
|
||||
radius: height / 2
|
||||
color: locationButton.down || locationButton.checked ?
|
||||
subsurfaceTheme.primaryColor : subsurfaceTheme.lightPrimaryColor
|
||||
border.color: subsurfaceTheme.darkerPrimaryColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
color: subsurfaceTheme.darkerPrimaryColor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue