summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-26 13:04:22 -0600
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-26 13:04:22 -0600
commitd3b07cd2025b0ee1ba76b8e92492f035ff447f33 (patch)
treea4b42cb95b3829b7631b5e6a557c64d9175b5672
parent1d8bc8edef997544243d66d9761ccfb7a51a8d74 (diff)
downloadkube-d3b07cd2025b0ee1ba76b8e92492f035ff447f33.tar.gz
kube-d3b07cd2025b0ee1ba76b8e92492f035ff447f33.zip
Bring back the highlight on buttons
-rw-r--r--framework/qml/AbstractButton.qml3
-rw-r--r--framework/qml/DelegateBackground.qml2
-rw-r--r--framework/qml/PositiveButton.qml2
3 files changed, 7 insertions, 0 deletions
diff --git a/framework/qml/AbstractButton.qml b/framework/qml/AbstractButton.qml
index c49a490b..d55176ea 100644
--- a/framework/qml/AbstractButton.qml
+++ b/framework/qml/AbstractButton.qml
@@ -26,6 +26,8 @@ T.Button {
26 26
27 property color color: Colors.buttonColor 27 property color color: Colors.buttonColor
28 property color textColor: Colors.textColor 28 property color textColor: Colors.textColor
29 property alias highlightColor: background.highlightColor
30 property alias highlightOpacity: background.highlightOpacity
29 property alias horizontalAlignment: label.horizontalAlignment 31 property alias horizontalAlignment: label.horizontalAlignment
30 property alias verticalAlignment: label.verticalAlignment 32 property alias verticalAlignment: label.verticalAlignment
31 33
@@ -41,6 +43,7 @@ T.Button {
41 Keys.onReturnPressed: root.clicked() 43 Keys.onReturnPressed: root.clicked()
42 44
43 background: DelegateBackground { 45 background: DelegateBackground {
46 id: background
44 selected: root.checked 47 selected: root.checked
45 focused: root.hovered || root.visualFocus 48 focused: root.hovered || root.visualFocus
46 color: root.color 49 color: root.color
diff --git a/framework/qml/DelegateBackground.qml b/framework/qml/DelegateBackground.qml
index 633a39ca..4059d69a 100644
--- a/framework/qml/DelegateBackground.qml
+++ b/framework/qml/DelegateBackground.qml
@@ -25,6 +25,7 @@ Rectangle {
25 property bool focused: false 25 property bool focused: false
26 property bool selected: false 26 property bool selected: false
27 property color highlightColor: Kube.Colors.highlightColor 27 property color highlightColor: Kube.Colors.highlightColor
28 property alias highlightOpacity: highlight.opacity
28 property color borderColor: Kube.Colors.focusedButtonColor 29 property color borderColor: Kube.Colors.focusedButtonColor
29 30
30 Rectangle { 31 Rectangle {
@@ -33,6 +34,7 @@ Rectangle {
33 color: root.highlightColor 34 color: root.highlightColor
34 } 35 }
35 Rectangle { 36 Rectangle {
37 id: highlight
36 anchors.fill: parent 38 anchors.fill: parent
37 visible: root.focused && !root.selected 39 visible: root.focused && !root.selected
38 color: root.highlightColor 40 color: root.highlightColor
diff --git a/framework/qml/PositiveButton.qml b/framework/qml/PositiveButton.qml
index 32bd7508..f158ad10 100644
--- a/framework/qml/PositiveButton.qml
+++ b/framework/qml/PositiveButton.qml
@@ -21,4 +21,6 @@ import org.kube.framework 1.0
21AbstractButton { 21AbstractButton {
22 color: Colors.positiveColor 22 color: Colors.positiveColor
23 textColor: Colors.highlightedTextColor 23 textColor: Colors.highlightedTextColor
24 highlightColor: Colors.viewBackgroundColor
25 highlightOpacity: 0.2
24} 26}