diff options
author | Sebastian Kügler <sebas@kde.org> | 2015-11-30 01:48:10 +0100 |
---|---|---|
committer | Sebastian Kügler <sebas@kde.org> | 2015-11-30 02:43:40 +0100 |
commit | 5f40ac6da3b7550aacc3b80a594ffc18c03f9efa (patch) | |
tree | 2bb76f885937d23c17b3213a4b427c54fd3dd442 /qt-mobile/qml | |
parent | c5722773d210928b52fb36b65ac50954b9c01d50 (diff) | |
download | subsurface-5f40ac6da3b7550aacc3b80a594ffc18c03f9efa.tar.gz |
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>
Diffstat (limited to 'qt-mobile/qml')
-rw-r--r-- | qt-mobile/qml/main.qml | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml index cf0e1078e..1888a77e8 100644 --- a/qt-mobile/qml/main.qml +++ b/qt-mobile/qml/main.qml @@ -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 } } } |