summaryrefslogtreecommitdiff
path: root/src/tutorials/Tooltip.qml
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2015-01-06 19:31:53 +0100
committerTannin <devnull@localhost>2015-01-06 19:31:53 +0100
commit9edc39633b82b5e02d33c4b0a395fe110af28eb4 (patch)
tree90d627525292cb87f3d4b7330b1847a17b568b61 /src/tutorials/Tooltip.qml
parentb415db619ed027ec2acd283983624293274b090f (diff)
- bugfixes
- moved more functionality to game-plugins - further decoupled management functionality from the UI - created another "tutorial" which is only a single page with relevant parts of the ui highlighted with info as tooltips
Diffstat (limited to 'src/tutorials/Tooltip.qml')
-rw-r--r--src/tutorials/Tooltip.qml31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/tutorials/Tooltip.qml b/src/tutorials/Tooltip.qml
new file mode 100644
index 00000000..6424d9ab
--- /dev/null
+++ b/src/tutorials/Tooltip.qml
@@ -0,0 +1,31 @@
+import QtQuick 1.1
+
+
+Rectangle {
+ color: "#EE888888"
+ width: childrenRect.width + 15
+ height: childrenRect.height + 15
+ z: 20000
+ clip: false
+ border.color: "black"
+ border.width: 1
+ property alias text: tooltipText.text
+ Text {
+ id: tooltipText
+ font.pointSize: 11
+ wrapMode: Text.WordWrap
+ anchors.left: parent.left
+ anchors.top: parent.top
+ anchors.leftMargin: 7
+ anchors.rightMargin: 7
+ z: parent.z
+ color: "black"
+ onTextChanged: {
+ if (width > 200)
+ width = 200
+ }
+ }
+ visible: false
+}
+
+