diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-09-14 09:45:45 +0200 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-09-14 09:45:45 +0200 |
commit | f4bc66730d42988f5f3045d78c75512b739d02cb (patch) | |
tree | 527c67ce174430a839aeca2ec91a56486c9b91e2 /framework/qml/RequiredTextField.qml | |
parent | 150dcdbc142d718f01b43f01f7a7f14db44f55fe (diff) | |
download | kube-f4bc66730d42988f5f3045d78c75512b739d02cb.tar.gz kube-f4bc66730d42988f5f3045d78c75512b739d02cb.zip |
improve requierd text visualisation
Diffstat (limited to 'framework/qml/RequiredTextField.qml')
-rw-r--r-- | framework/qml/RequiredTextField.qml | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/framework/qml/RequiredTextField.qml b/framework/qml/RequiredTextField.qml index 9ee3bece..7552ebfb 100644 --- a/framework/qml/RequiredTextField.qml +++ b/framework/qml/RequiredTextField.qml | |||
@@ -23,6 +23,15 @@ import org.kube.framework 1.0 as Kube | |||
23 | Kube.TextField { | 23 | Kube.TextField { |
24 | id: root | 24 | id: root |
25 | validator: RegExpValidator { regExp: /.*\S.*/ } | 25 | validator: RegExpValidator { regExp: /.*\S.*/ } |
26 | backgroundColor: acceptableInput ? Kube.Colors.viewBackgroundColor : Kube.Colors.warningColor | 26 | |
27 | backgroundOpacity: acceptableInput ? 1.0 : 0.2 | 27 | Rectangle { |
28 | anchors { | ||
29 | left: parent.left | ||
30 | right: parent.right | ||
31 | bottom: parent.bottom | ||
32 | margins: 1 | ||
33 | } | ||
34 | height: 3 | ||
35 | color: acceptableInput ? root.activefocus ? Kube.Colors.positiveColor : "transparent" : Kube.Colors.warningColor | ||
36 | } | ||
28 | } | 37 | } |