diff options
Diffstat (limited to 'framework')
-rw-r--r-- | framework/qml/IconButton.qml | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/framework/qml/IconButton.qml b/framework/qml/IconButton.qml index 3be0b887..f6b97090 100644 --- a/framework/qml/IconButton.qml +++ b/framework/qml/IconButton.qml | |||
@@ -26,8 +26,8 @@ T.Button { | |||
26 | 26 | ||
27 | property alias iconName: icon.iconName | 27 | property alias iconName: icon.iconName |
28 | 28 | ||
29 | width: Kube.Units.gridUnit + padding * 2 | 29 | width: Kube.Units.gridUnit + leftPadding + rightPadding |
30 | height: Kube.Units.gridUnit + padding * 2 | 30 | height: Kube.Units.gridUnit + topPadding + bottomPadding |
31 | 31 | ||
32 | padding: Kube.Units.smallSpacing | 32 | padding: Kube.Units.smallSpacing |
33 | 33 | ||
@@ -35,15 +35,26 @@ T.Button { | |||
35 | hoverEnabled: true | 35 | hoverEnabled: true |
36 | Keys.onReturnPressed: root.clicked() | 36 | Keys.onReturnPressed: root.clicked() |
37 | 37 | ||
38 | background: Rectangle { | 38 | background: Item { |
39 | color: Kube.Colors.focusedButtonColor | 39 | Rectangle { |
40 | 40 | anchors.fill: parent | |
41 | visible: root.hovered || root.visualFocus | 41 | visible: root.checked |
42 | color: Kube.Colors.highlightColor | ||
43 | } | ||
44 | Rectangle { | ||
45 | anchors.fill: parent | ||
46 | visible: root.hovered || root.visualFocus | ||
47 | color: "transparent" | ||
48 | border { | ||
49 | width: 2 | ||
50 | color: Kube.Colors.focusedButtonColor | ||
51 | } | ||
52 | } | ||
42 | 53 | ||
43 | Rectangle { | 54 | Rectangle { |
44 | anchors.fill: parent | 55 | anchors.fill: parent |
45 | visible: root.hovered || root.pressed | 56 | visible: root.pressed |
46 | color: root.pressed ? Kube.Colors.textColor : Kube.Colors.viewBackgroundColor | 57 | color: Kube.Colors.textColor |
47 | opacity: 0.2 | 58 | opacity: 0.2 |
48 | } | 59 | } |
49 | } | 60 | } |