diff options
| author | Riccardo Spagni <ric@spagni.net> | 2016-11-09 20:43:33 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2016-11-09 20:43:33 +0200 |
| commit | 1e249c16244133a1461fd2b0260117dae4bc74af (patch) | |
| tree | de637720e4a27c80677097e683c413831b009340 /components | |
| parent | 60b65b9bcc9d3445593a6eca435819144ee64021 (diff) | |
| parent | 142e34862618a587bd905a972310d22e57122a19 (diff) | |
| download | monzero-gui-1e249c16244133a1461fd2b0260117dae4bc74af.tar.gz monzero-gui-1e249c16244133a1461fd2b0260117dae4bc74af.tar.xz monzero-gui-1e249c16244133a1461fd2b0260117dae4bc74af.zip | |
Merge pull request #117
142e348 Transfer: use the new error LineEdit property to highlight bad fields (moneromooo.monero)
b97d0a9 LineEdit: add an error property (moneromooo.monero)
5fb4e89 Transfer: remove spammy debug traces (moneromooo.monero)
Diffstat (limited to 'components')
| -rw-r--r-- | components/LineEdit.qml | 10 |
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 } |
