diff options
-rw-r--r-- | framework/qml/RequiredTextField.qml | 8 | ||||
-rw-r--r-- | framework/qml/TextField.qml | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/framework/qml/RequiredTextField.qml b/framework/qml/RequiredTextField.qml index 2e3512a4..9ee3bece 100644 --- a/framework/qml/RequiredTextField.qml +++ b/framework/qml/RequiredTextField.qml | |||
@@ -23,10 +23,6 @@ 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 | Rectangle { | 26 | backgroundColor: acceptableInput ? Kube.Colors.viewBackgroundColor : Kube.Colors.warningColor |
27 | anchors.fill: parent | 27 | backgroundOpacity: acceptableInput ? 1.0 : 0.2 |
28 | opacity: 0.2 | ||
29 | color: Kube.Colors.warningColor | ||
30 | visible: !root.acceptableInput | ||
31 | } | ||
32 | } | 28 | } |
diff --git a/framework/qml/TextField.qml b/framework/qml/TextField.qml index cfb1478d..feb34a33 100644 --- a/framework/qml/TextField.qml +++ b/framework/qml/TextField.qml | |||
@@ -23,6 +23,9 @@ import org.kube.framework 1.0 as Kube | |||
23 | T.TextField { | 23 | T.TextField { |
24 | id: root | 24 | id: root |
25 | 25 | ||
26 | property alias backgroundColor: background.color | ||
27 | property alias backgroundOpacity: background.opacity | ||
28 | |||
26 | implicitHeight: Kube.Units.gridUnit + Kube.Units.smallSpacing * 2 | 29 | implicitHeight: Kube.Units.gridUnit + Kube.Units.smallSpacing * 2 |
27 | implicitWidth: Kube.Units.gridUnit * 5 + Kube.Units.smallSpacing * 2 | 30 | implicitWidth: Kube.Units.gridUnit * 5 + Kube.Units.smallSpacing * 2 |
28 | 31 | ||
@@ -48,6 +51,7 @@ T.TextField { | |||
48 | } | 51 | } |
49 | 52 | ||
50 | background: Rectangle { | 53 | background: Rectangle { |
54 | id: background | ||
51 | color: Kube.Colors.viewBackgroundColor | 55 | color: Kube.Colors.viewBackgroundColor |
52 | border.width: 1 | 56 | border.width: 1 |
53 | border.color: root.activeFocus ? Kube.Colors.highlightColor : Kube.Colors.buttonColor | 57 | border.color: root.activeFocus ? Kube.Colors.highlightColor : Kube.Colors.buttonColor |