diff options
author | Christian Mollekopf <mollekopf@kolabsystems.com> | 2017-10-23 17:40:41 +0200 |
---|---|---|
committer | Christian Mollekopf <mollekopf@kolabsystems.com> | 2017-10-23 17:40:41 +0200 |
commit | 62c95ab81110ab568b7bb0449435d7def9eb84c9 (patch) | |
tree | f4d4623d076ef790a3d6aa45eeb3369b609bb619 /framework/qml/DelegateBackground.qml | |
parent | 24be20894e09f92a30ca42a052ad3d5dad8ea29c (diff) | |
download | kube-62c95ab81110ab568b7bb0449435d7def9eb84c9.tar.gz kube-62c95ab81110ab568b7bb0449435d7def9eb84c9.zip |
"alert" button mode to draw attention to a button.
Diffstat (limited to 'framework/qml/DelegateBackground.qml')
-rw-r--r-- | framework/qml/DelegateBackground.qml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/framework/qml/DelegateBackground.qml b/framework/qml/DelegateBackground.qml index 4059d69a..f725352a 100644 --- a/framework/qml/DelegateBackground.qml +++ b/framework/qml/DelegateBackground.qml | |||
@@ -24,9 +24,11 @@ Rectangle { | |||
24 | id: root | 24 | id: root |
25 | property bool focused: false | 25 | property bool focused: false |
26 | property bool selected: false | 26 | property bool selected: false |
27 | property bool alert: false | ||
27 | property color highlightColor: Kube.Colors.highlightColor | 28 | property color highlightColor: Kube.Colors.highlightColor |
28 | property alias highlightOpacity: highlight.opacity | 29 | property alias highlightOpacity: highlight.opacity |
29 | property color borderColor: Kube.Colors.focusedButtonColor | 30 | property color borderColor: Kube.Colors.focusedButtonColor |
31 | property color alertColor: Kube.Colors.warningColor | ||
30 | 32 | ||
31 | Rectangle { | 33 | Rectangle { |
32 | anchors.fill: parent | 34 | anchors.fill: parent |
@@ -42,8 +44,8 @@ Rectangle { | |||
42 | } | 44 | } |
43 | Rectangle { | 45 | Rectangle { |
44 | anchors.fill: parent | 46 | anchors.fill: parent |
45 | visible: root.focused && root.selected | 47 | visible: root.focused && root.selected || root.alert |
46 | border.color: root.borderColor | 48 | border.color: root.alert ? root.alertColor : root.borderColor |
47 | border.width: 2 | 49 | border.width: 2 |
48 | color: "transparent" | 50 | color: "transparent" |
49 | } | 51 | } |