From cf3d91d6db86fb74d5968405371c4e83b1410d86 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 29 May 2013 13:32:25 +0200 Subject: Make styleHints a variant map The styleHints are not really flexible enough as a stringlist as we want to be able to pass actual properties. Since we already have a properties member of the style we should move all of our internal properties to that. Change-Id: Id7a66ade243461f54c41b9ec89144668aaf19483 Reviewed-by: Gabriel de Dietrich --- src/styles/Desktop/TextFieldStyle.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/styles/Desktop/TextFieldStyle.qml') diff --git a/src/styles/Desktop/TextFieldStyle.qml b/src/styles/Desktop/TextFieldStyle.qml index 9a093d2a..ee6779eb 100644 --- a/src/styles/Desktop/TextFieldStyle.qml +++ b/src/styles/Desktop/TextFieldStyle.qml @@ -64,9 +64,9 @@ Style { property color selectedTextColor: syspal.highlightedText - property bool rounded: hints.indexOf("rounded") > -1 + property bool rounded: !!hints["rounded"] property int topMargin: style === "mac" ? 3 : 2 - property int leftMargin: rounded ? 8 : 4 + property int leftMargin: rounded ? 12 : 4 property int rightMargin: leftMargin property int bottomMargin: 2 @@ -76,7 +76,7 @@ Style { FocusFrame { anchors.fill: parent - visible: textfield.activeFocus && textfieldstyle.styleHint("focuswidget") + visible: textfield.activeFocus && textfieldstyle.styleHint("focuswidget") && !rounded } } } -- cgit v1.2.1 From 420bb714a8c8ebc67ad958897939d7d96e11806c Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 5 Jun 2013 09:54:28 +0200 Subject: Expose hovered to our controls and document it consistently The current solution is messy and we only expose it partially to some of our styles. I think we should simply expose this to all. Change-Id: Ia546d5657ea416df99c9d9d92cc714b7f1c928fe Reviewed-by: Caroline Chao Reviewed-by: Nico Vertriest --- src/styles/Desktop/TextFieldStyle.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/styles/Desktop/TextFieldStyle.qml') diff --git a/src/styles/Desktop/TextFieldStyle.qml b/src/styles/Desktop/TextFieldStyle.qml index ee6779eb..8f71a45c 100644 --- a/src/styles/Desktop/TextFieldStyle.qml +++ b/src/styles/Desktop/TextFieldStyle.qml @@ -48,7 +48,7 @@ Style { sunken: true hasFocus: control.activeFocus - hover: __containsMouse + hover: hovered hints: control.styleHints SystemPalette { -- cgit v1.2.1