diff options
Diffstat (limited to 'framework/qml/TextButton.qml')
-rw-r--r-- | framework/qml/TextButton.qml | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/framework/qml/TextButton.qml b/framework/qml/TextButton.qml index 4d7ea27d..ff4bf1a6 100644 --- a/framework/qml/TextButton.qml +++ b/framework/qml/TextButton.qml | |||
@@ -16,28 +16,9 @@ | |||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | import QtQuick 2.7 | ||
20 | import QtQuick.Templates 2.0 as T | ||
21 | import org.kube.framework 1.0 | 19 | import org.kube.framework 1.0 |
22 | 20 | ||
23 | T.Button { | 21 | AbstractButton { |
24 | id: root | 22 | color: "transparent" |
25 | 23 | padding: Units.smallSpacing | |
26 | property alias color: label.color | ||
27 | |||
28 | width: Math.max(Units.gridUnit, contentItem.implicitWidth + leftPadding + rightPadding) | ||
29 | height: contentItem.implicitHeight + topPadding + bottomPadding | ||
30 | |||
31 | clip: true | ||
32 | hoverEnabled: true | ||
33 | Keys.onReturnPressed: root.clicked() | ||
34 | |||
35 | contentItem: Label { | ||
36 | id: label | ||
37 | text: root.text | ||
38 | font.underline: root.activeFocus || root.hovered | ||
39 | elide: Text.ElideRight | ||
40 | horizontalAlignment: Text.AlignHCenter | ||
41 | verticalAlignment: Text.AlignVCenter | ||
42 | } | ||
43 | } | 24 | } |