diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-20 14:24:14 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-20 14:24:14 -0600 |
commit | 633eed6bb6bc2251cfb324d8017279bee14578b0 (patch) | |
tree | 0dbf47f91987011ed3a0108e32137eeaa763a1d6 /framework/qml/IconButton.qml | |
parent | b2fae6c6dbc3d50a77e2e7cc25e7ec3089ace39c (diff) | |
download | kube-633eed6bb6bc2251cfb324d8017279bee14578b0.tar.gz kube-633eed6bb6bc2251cfb324d8017279bee14578b0.zip |
Make the tooltip a feature of IconButton
Diffstat (limited to 'framework/qml/IconButton.qml')
-rw-r--r-- | framework/qml/IconButton.qml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/framework/qml/IconButton.qml b/framework/qml/IconButton.qml index 302e51b0..8fd8b705 100644 --- a/framework/qml/IconButton.qml +++ b/framework/qml/IconButton.qml | |||
@@ -23,6 +23,7 @@ AbstractButton { | |||
23 | id: root | 23 | id: root |
24 | 24 | ||
25 | property alias iconName: icon.iconName | 25 | property alias iconName: icon.iconName |
26 | property alias tooltip: toolTipItem.text | ||
26 | 27 | ||
27 | width: Units.gridUnit + leftPadding + rightPadding | 28 | width: Units.gridUnit + leftPadding + rightPadding |
28 | height: Units.gridUnit + topPadding + bottomPadding | 29 | height: Units.gridUnit + topPadding + bottomPadding |
@@ -33,5 +34,10 @@ AbstractButton { | |||
33 | contentItem: Icon { | 34 | contentItem: Icon { |
34 | id: icon | 35 | id: icon |
35 | } | 36 | } |
37 | |||
38 | ToolTip { | ||
39 | id: toolTipItem | ||
40 | visible: parent.hovered && text != "" | ||
41 | } | ||
36 | } | 42 | } |
37 | 43 | ||