diff options
Diffstat (limited to 'framework/qml/RequiredTextField.qml')
-rw-r--r-- | framework/qml/RequiredTextField.qml | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/framework/qml/RequiredTextField.qml b/framework/qml/RequiredTextField.qml index 7552ebfb..0c76d144 100644 --- a/framework/qml/RequiredTextField.qml +++ b/framework/qml/RequiredTextField.qml | |||
@@ -25,6 +25,7 @@ Kube.TextField { | |||
25 | validator: RegExpValidator { regExp: /.*\S.*/ } | 25 | validator: RegExpValidator { regExp: /.*\S.*/ } |
26 | 26 | ||
27 | Rectangle { | 27 | Rectangle { |
28 | id: validIndicator | ||
28 | anchors { | 29 | anchors { |
29 | left: parent.left | 30 | left: parent.left |
30 | right: parent.right | 31 | right: parent.right |
@@ -32,6 +33,22 @@ Kube.TextField { | |||
32 | margins: 1 | 33 | margins: 1 |
33 | } | 34 | } |
34 | height: 3 | 35 | height: 3 |
35 | color: acceptableInput ? root.activefocus ? Kube.Colors.positiveColor : "transparent" : Kube.Colors.warningColor | 36 | color: acceptableInput ? Kube.Colors.positiveColor : Kube.Colors.warningColor |
37 | |||
38 | OpacityAnimator { | ||
39 | target: validIndicator | ||
40 | from: opacity | ||
41 | to: 0 | ||
42 | duration: 1000 | ||
43 | running: acceptableInput | ||
44 | } | ||
45 | |||
46 | OpacityAnimator { | ||
47 | target: validIndicator | ||
48 | from: opacity | ||
49 | to: 1 | ||
50 | duration: 100 | ||
51 | running: !acceptableInput | ||
52 | } | ||
36 | } | 53 | } |
37 | } | 54 | } |