mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Mobile settings: stylize switches
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
This commit is contained in:
parent
8d2b59ff31
commit
213f68d922
2 changed files with 42 additions and 0 deletions
|
@ -97,6 +97,27 @@ Item {
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
password.echoMode = checked ? TextInput.Normal : TextInput.Password
|
password.echoMode = checked ? TextInput.Normal : TextInput.Password
|
||||||
}
|
}
|
||||||
|
indicator: Rectangle {
|
||||||
|
implicitWidth: Kirigami.Units.largeSpacing * 3
|
||||||
|
implicitHeight: Kirigami.Units.largeSpacing
|
||||||
|
x: showPassword.leftPadding
|
||||||
|
y: parent.height / 2 - height / 2
|
||||||
|
radius: Kirigami.Units.largeSpacing * 0.5
|
||||||
|
color: showPassword.checked ?
|
||||||
|
subsurfaceTheme.lightPrimaryColor : subsurfaceTheme.backgroundColor
|
||||||
|
border.color: subsurfaceTheme.darkerPrimaryColor
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
x: showPassword.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: showPassword.down || showPassword.checked ?
|
||||||
|
subsurfaceTheme.primaryColor : subsurfaceTheme.lightPrimaryColor
|
||||||
|
border.color: subsurfaceTheme.darkerPrimaryColor
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -379,6 +379,27 @@ Kirigami.ScrollablePage {
|
||||||
onClicked: {
|
onClicked: {
|
||||||
manager.libdcLog = checked
|
manager.libdcLog = checked
|
||||||
}
|
}
|
||||||
|
indicator: Rectangle {
|
||||||
|
implicitWidth: Kirigami.Units.largeSpacing * 3
|
||||||
|
implicitHeight: Kirigami.Units.largeSpacing
|
||||||
|
x: libdclogButton.leftPadding
|
||||||
|
y: parent.height / 2 - height / 2
|
||||||
|
radius: Kirigami.Units.largeSpacing * 0.5
|
||||||
|
color: libdclogButton.checked ?
|
||||||
|
subsurfaceTheme.lightPrimaryColor : subsurfaceTheme.backgroundColor
|
||||||
|
border.color: subsurfaceTheme.darkerPrimaryColor
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
x: libdclogButton.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: libdclogButton.down || libdclogButton.checked ?
|
||||||
|
subsurfaceTheme.primaryColor : subsurfaceTheme.lightPrimaryColor
|
||||||
|
border.color: subsurfaceTheme.darkerPrimaryColor
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GridLayout {
|
GridLayout {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue