diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-26 10:57:45 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-26 11:08:30 -0600 |
commit | c545b2e480d29d4a2149ca4cbadd84b6d23542e8 (patch) | |
tree | c54e59557c83a0e5bc6f2630cd8b42062a6b6edb /framework/qml/AbstractButton.qml | |
parent | 0527b2da9740862deb795768f8a6a6a3426faaab (diff) | |
download | kube-c545b2e480d29d4a2149ca4cbadd84b6d23542e8.tar.gz kube-c545b2e480d29d4a2149ca4cbadd84b6d23542e8.zip |
The account switcher is a control too
Diffstat (limited to 'framework/qml/AbstractButton.qml')
-rw-r--r-- | framework/qml/AbstractButton.qml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/framework/qml/AbstractButton.qml b/framework/qml/AbstractButton.qml index 194812da..a964fe2f 100644 --- a/framework/qml/AbstractButton.qml +++ b/framework/qml/AbstractButton.qml | |||
@@ -24,6 +24,11 @@ import org.kube.framework 1.0 | |||
24 | T.Button { | 24 | T.Button { |
25 | id: root | 25 | id: root |
26 | 26 | ||
27 | property color color: Colors.buttonColor | ||
28 | property color textColor: Colors.textColor | ||
29 | property alias horizontalAlignment: label.horizontalAlignment | ||
30 | property alias verticalAlignment: label.verticalAlignment | ||
31 | |||
27 | width: Math.max(Units.gridUnit, contentItem.implicitWidth + leftPadding + rightPadding) | 32 | width: Math.max(Units.gridUnit, contentItem.implicitWidth + leftPadding + rightPadding) |
28 | height: contentItem.implicitHeight + topPadding + bottomPadding | 33 | height: contentItem.implicitHeight + topPadding + bottomPadding |
29 | 34 | ||
@@ -35,8 +40,7 @@ T.Button { | |||
35 | hoverEnabled: true | 40 | hoverEnabled: true |
36 | Keys.onReturnPressed: root.clicked() | 41 | Keys.onReturnPressed: root.clicked() |
37 | 42 | ||
38 | property color color: Colors.buttonColor | 43 | font.family: Kube.Font.fontFamily |
39 | property color textColor: Colors.textColor | ||
40 | 44 | ||
41 | background: Rectangle { | 45 | background: Rectangle { |
42 | color: root.color | 46 | color: root.color |
@@ -64,10 +68,12 @@ T.Button { | |||
64 | } | 68 | } |
65 | 69 | ||
66 | contentItem: Label { | 70 | contentItem: Label { |
71 | id: label | ||
67 | text: root.text | 72 | text: root.text |
68 | elide: Text.ElideRight | 73 | elide: Text.ElideRight |
69 | horizontalAlignment: Text.AlignHCenter | 74 | horizontalAlignment: Text.AlignHCenter |
70 | verticalAlignment: Text.AlignVCenter | 75 | verticalAlignment: Text.AlignVCenter |
71 | color: root.textColor | 76 | color: root.textColor |
77 | font: root.font | ||
72 | } | 78 | } |
73 | } | 79 | } |