summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2014-11-09 13:10:50 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2014-11-10 12:18:30 +0100
commit09a56c4fe9999b5e1ab8921d37ae8f9a000f6ad6 (patch)
tree958533112a188e3c33b28254735c10a480bbf369
parent6c9ba0eb17e28719c50eef00c69f812aa2deba0a (diff)
downloadqtquickcontrols-09a56c4fe9999b5e1ab8921d37ae8f9a000f6ad6.tar.gz
Android/SwitchStyle: hide thumb text on Android 5.0
Change-Id: Ied63a5bd58a88f097ac9e20f30c21d45f45a2f46 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
-rw-r--r--src/controls/Styles/Android/SwitchStyle.qml3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/controls/Styles/Android/SwitchStyle.qml b/src/controls/Styles/Android/SwitchStyle.qml
index 8401d353..6e9260c3 100644
--- a/src/controls/Styles/Android/SwitchStyle.qml
+++ b/src/controls/Styles/Android/SwitchStyle.qml
@@ -79,6 +79,8 @@ SwitchStyle {
Item {
id: thumb
+ readonly property bool hideText: AndroidStyle.styleDef.switchStyle.Switch_showText === false
+
x: control.checked ? max : min
TextMetrics {
@@ -126,6 +128,7 @@ SwitchStyle {
LabelStyle {
id: label
+ visible: !thumb.hideText
text: control.checked ? panel.styleDef.Switch_textOn : panel.styleDef.Switch_textOff
pressed: control.pressed