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 {
|
MouseArea {
|
||||||
text: "Run location service"
|
height: childrenRect.height
|
||||||
checked: manager.locationServiceEnabled
|
width: MobileComponents.Units.gridUnit * 10
|
||||||
onCheckedChanged: {
|
CheckBox {
|
||||||
manager.locationServiceEnabled = checked;
|
//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
Add a link
Reference in a new issue