2014-08-27 15:23:59 +00:00
|
|
|
import QtQuick 2.0
|
|
|
|
|
2015-08-18 16:22:16 +00:00
|
|
|
BaseRectangle {
|
2015-08-19 23:15:08 +00:00
|
|
|
property var hovered
|
2014-08-27 15:23:59 +00:00
|
|
|
property string helptext
|
|
|
|
property string hovertext
|
2015-08-19 23:15:08 +00:00
|
|
|
width: content.width + 10
|
|
|
|
height: content.height + 10
|
|
|
|
enabled: content.deftext ? true : false
|
|
|
|
anchors.margins: 5
|
2014-08-27 15:23:59 +00:00
|
|
|
|
|
|
|
color: "#99000000"
|
|
|
|
|
|
|
|
Text {
|
|
|
|
id: content
|
|
|
|
color: "white"
|
2015-08-19 23:15:08 +00:00
|
|
|
font.bold: true
|
|
|
|
font.pixelSize: 12
|
|
|
|
property string deftext: parent.helptext || parent.hovertext
|
|
|
|
property string oldtext
|
|
|
|
text: deftext || oldtext
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
|
|
onDeftextChanged: {
|
|
|
|
if (deftext)
|
|
|
|
{
|
|
|
|
oldtext = deftext;
|
|
|
|
}
|
|
|
|
}
|
2014-08-27 15:23:59 +00:00
|
|
|
}
|
|
|
|
}
|