aboutsummaryrefslogtreecommitdiff
path: root/components/Label.qml
diff options
context:
space:
mode:
authormarcin <z.krzysztoff7@gmail.com>2014-07-09 16:18:48 +0200
committermarcin <z.krzysztoff7@gmail.com>2014-07-09 16:18:48 +0200
commit92c594ca8cefa8ba59dcad1e3f5df170d1880ba0 (patch)
tree236d2647ef6677c887013436f6b0d0cd733ae6ab /components/Label.qml
parent202da4caf9b3b26eda353016bc9f6fc9f2694ae6 (diff)
downloadmonzero-gui-92c594ca8cefa8ba59dcad1e3f5df170d1880ba0.tar.gz
monzero-gui-92c594ca8cefa8ba59dcad1e3f5df170d1880ba0.tar.xz
monzero-gui-92c594ca8cefa8ba59dcad1e3f5df170d1880ba0.zip
dashboard + few tipitem fix + shortcuts
Diffstat (limited to 'components/Label.qml')
-rw-r--r--components/Label.qml22
1 files changed, 22 insertions, 0 deletions
diff --git a/components/Label.qml b/components/Label.qml
index 35101ff1..eee9c211 100644
--- a/components/Label.qml
+++ b/components/Label.qml
@@ -1,8 +1,10 @@
import QtQuick 2.0
Item {
+ id: item
property alias text: label.text
property alias color: label.color
+ property string tipText: ""
property int fontSize: 12
width: icon.x + icon.width
height: icon.height
@@ -25,4 +27,24 @@ Item {
source: "../images/whatIsIcon.png"
visible: appWindow.whatIsEnable
}
+
+ MouseArea {
+ anchors.fill: icon
+ enabled: appWindow.whatIsEnable
+ hoverEnabled: true
+ onEntered: {
+ icon.visible = false
+ var pos = rootItem.mapFromItem(icon, 0, -15)
+ tipItem.text = item.tipText
+ tipItem.x = pos.x
+ if(tipItem.height > 30)
+ pos.y -= tipItem.height - 28
+ tipItem.y = pos.y
+ tipItem.visible = true
+ }
+ onExited: {
+ icon.visible = true
+ tipItem.visible = false
+ }
+ }
}