mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Style the checkbox
Using a normal checkbox, we get black text, not our styled Label. Since, short of doing a style, this is the only way to get the label the right color, and thus not screw up the visual appearance of the drawer, we hand-roll it. This is a bit clunky, but I prefer visual continuity here over code complexity concerns. Signed-off-by: Sebastian Kügler <sebas@kde.org>
This commit is contained in:
parent
c5722773d2
commit
5f40ac6da3
1 changed files with 27 additions and 5 deletions
|
@ -106,11 +106,33 @@ MobileComponents.ApplicationWindow {
|
|||
}
|
||||
}
|
||||
]
|
||||
CheckBox {
|
||||
text: "Run location service"
|
||||
checked: manager.locationServiceEnabled
|
||||
onCheckedChanged: {
|
||||
manager.locationServiceEnabled = checked;
|
||||
MouseArea {
|
||||
height: childrenRect.height
|
||||
width: MobileComponents.Units.gridUnit * 10
|
||||
CheckBox {
|
||||
//text: "Run location service"
|
||||
id: locationCheckbox
|
||||
anchors {
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
}
|
||||
checked: manager.locationServiceEnabled
|
||||
onCheckedChanged: {
|
||||
manager.locationServiceEnabled = checked;
|
||||
}
|
||||
}
|
||||
MobileComponents.Label {
|
||||
x: MobileComponents.Units.gridUnit * 1.5
|
||||
anchors {
|
||||
left: locationCheckbox.right
|
||||
//leftMargin: units.smallSpacing
|
||||
verticalCenter: locationCheckbox.verticalCenter
|
||||
}
|
||||
text: "Run location service"
|
||||
}
|
||||
onClicked: {
|
||||
print("Click.")
|
||||
locationCheckbox.checked = !locationCheckbox.checked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue