aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authormoneromooo.monero <moneromooo.monero@users.noreply.github.com>2016-11-06 12:12:11 +0000
committermoneromooo.monero <moneromooo.monero@users.noreply.github.com>2016-11-06 12:12:11 +0000
commitb97d0a934d7399fe34648abb6cf1757b1b53276e (patch)
treebf3ee248f97a7f33d0ebb5aa739596acc0a8c91a /components
parent5fb4e89531e7a7b86ba1bf6a173ebb8c91093278 (diff)
downloadmonzero-gui-b97d0a934d7399fe34648abb6cf1757b1b53276e.tar.gz
monzero-gui-b97d0a934d7399fe34648abb6cf1757b1b53276e.tar.xz
monzero-gui-b97d0a934d7399fe34648abb6cf1757b1b53276e.zip
LineEdit: add an error property
This is then used to display a reddish background when it's true
Diffstat (limited to 'components')
-rw-r--r--components/LineEdit.qml10
1 files changed, 9 insertions, 1 deletions
diff --git a/components/LineEdit.qml b/components/LineEdit.qml
index 2ebc6e0c..f1e275f2 100644
--- a/components/LineEdit.qml
+++ b/components/LineEdit.qml
@@ -35,10 +35,18 @@ Item {
property alias readOnly : input.readOnly
property alias cursorPosition: input.cursorPosition
property int fontSize: 18
+ property bool error: false
height: 37
+ function getColor(error) {
+ if (error)
+ return "#FFDDDD"
+ else
+ return "#FFFFFF"
+ }
+
Rectangle {
anchors.fill: parent
anchors.bottomMargin: 1
@@ -49,7 +57,7 @@ Item {
Rectangle {
anchors.fill: parent
anchors.topMargin: 1
- color: "#FFFFFF"
+ color: getColor(error)
//radius: 4
}