diff options
Diffstat (limited to 'components/package/contents/ui/Button.qml')
-rw-r--r-- | components/package/contents/ui/Button.qml | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/components/package/contents/ui/Button.qml b/components/package/contents/ui/Button.qml index ceb8d0c3..978f41a6 100644 --- a/components/package/contents/ui/Button.qml +++ b/components/package/contents/ui/Button.qml | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | import QtQuick 2.7 | 19 | import QtQuick 2.7 |
20 | import org.kube.components.theme 1.0 as KubeTheme | 20 | import org.kube.components.theme 1.0 as KubeTheme |
21 | import org.kde.kirigami 1.0 as Kirigami | ||
21 | 22 | ||
22 | Rectangle { | 23 | Rectangle { |
23 | id: root | 24 | id: root |
@@ -25,13 +26,29 @@ Rectangle { | |||
25 | signal clicked() | 26 | signal clicked() |
26 | property alias text: text.text | 27 | property alias text: text.text |
27 | property color textColor: KubeTheme.Colors.highlightedTextColor | 28 | property color textColor: KubeTheme.Colors.highlightedTextColor |
29 | property string iconName: "" | ||
30 | property alias implicitHeight: content.implicitHeight | ||
31 | property alias implicitWidth: content.implicitWidth | ||
32 | width: implicitWidth | ||
33 | height: implicitHeight | ||
28 | 34 | ||
29 | clip: true | 35 | clip: true |
30 | 36 | ||
31 | Text { | 37 | Row { |
32 | id: text | 38 | id: content |
33 | anchors.centerIn: parent | 39 | anchors.centerIn: parent |
34 | color: root.textColor | 40 | spacing: Kirigami.Units.smallSpacing |
41 | Text { | ||
42 | id: text | ||
43 | anchors.verticalCenter: parent.verticalCenter | ||
44 | color: root.textColor | ||
45 | } | ||
46 | Icon { | ||
47 | id: icon | ||
48 | anchors.verticalCenter: parent.verticalCenter | ||
49 | iconName: root.iconName | ||
50 | visible: iconName != "" | ||
51 | } | ||
35 | } | 52 | } |
36 | 53 | ||
37 | MouseArea { | 54 | MouseArea { |