mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
QML UI: Style the radio buttons
This styles the radio buttons in the preferences pane so they follows the theme colors. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This commit is contained in:
parent
4c4b72853c
commit
4698b86b13
1 changed files with 60 additions and 0 deletions
|
@ -52,10 +52,30 @@ Kirigami.Page {
|
|||
}
|
||||
|
||||
RadioButton {
|
||||
id: bluebutton
|
||||
checked: subsurfaceTheme.currentTheme === "Blue"
|
||||
onClicked: {
|
||||
blueTheme()
|
||||
}
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 20
|
||||
implicitHeight: 20
|
||||
x: bluebutton.leftPadding
|
||||
y: parent.height / 2 - height / 2
|
||||
radius: 4
|
||||
border.color: bluebutton.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor
|
||||
color: subsurfaceTheme.backgroundColor
|
||||
|
||||
Rectangle {
|
||||
width: 12
|
||||
height: 12
|
||||
x: 4
|
||||
y: 4
|
||||
radius: 3
|
||||
color: bluebutton.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor
|
||||
visible: bluebutton.checked
|
||||
}
|
||||
}
|
||||
}
|
||||
Row {
|
||||
Label {
|
||||
|
@ -98,10 +118,30 @@ Kirigami.Page {
|
|||
}
|
||||
|
||||
RadioButton {
|
||||
id: pinkbutton
|
||||
checked: subsurfaceTheme.currentTheme === "Pink"
|
||||
onClicked: {
|
||||
pinkTheme()
|
||||
}
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 20
|
||||
implicitHeight: 20
|
||||
x: pinkbutton.leftPadding
|
||||
y: parent.height / 2 - height / 2
|
||||
radius: 4
|
||||
border.color: pinkbutton.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor
|
||||
color: subsurfaceTheme.backgroundColor
|
||||
|
||||
Rectangle {
|
||||
width: 12
|
||||
height: 12
|
||||
x: 4
|
||||
y: 4
|
||||
radius: 3
|
||||
color: pinkbutton.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor
|
||||
visible: pinkbutton.checked
|
||||
}
|
||||
}
|
||||
}
|
||||
Row {
|
||||
Label {
|
||||
|
@ -144,10 +184,30 @@ Kirigami.Page {
|
|||
}
|
||||
|
||||
RadioButton {
|
||||
id: darkbutton
|
||||
checked: subsurfaceTheme.currentTheme === "Dark"
|
||||
onClicked: {
|
||||
darkTheme()
|
||||
}
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 20
|
||||
implicitHeight: 20
|
||||
x: darkbutton.leftPadding
|
||||
y: parent.height / 2 - height / 2
|
||||
radius: 4
|
||||
border.color: darkbutton.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor
|
||||
color: subsurfaceTheme.backgroundColor
|
||||
|
||||
Rectangle {
|
||||
width: 12
|
||||
height: 12
|
||||
x: 4
|
||||
y: 4
|
||||
radius: 3
|
||||
color: darkbutton.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor
|
||||
visible: darkbutton.checked
|
||||
}
|
||||
}
|
||||
}
|
||||
Row {
|
||||
Label {
|
||||
|
|
Loading…
Reference in a new issue