Add a background to the tooltip label so long strings also have background

Contributes to #57
This commit is contained in:
Arjen Hiemstra 2015-06-17 17:43:03 +02:00
parent 46cd9e081b
commit ddbb952d9c

View File

@ -103,14 +103,19 @@ QtObject {
opacity: control.hovered ? 1.0 : 0.0; opacity: control.hovered ? 1.0 : 0.0;
Behavior on opacity { NumberAnimation { duration: 100; } } Behavior on opacity { NumberAnimation { duration: 100; } }
Rectangle {
anchors.horizontalCenter: parent.horizontalCenter;
width: childrenRect.width;
height: childrenRect.height;
Label { Label {
id: label id: label
anchors.horizontalCenter: parent.horizontalCenter;
text: control.text.replace("&", ""); text: control.text.replace("&", "");
font: UM.Theme.fonts.button_tooltip; font: UM.Theme.fonts.button_tooltip;
color: UM.Theme.colors.button_tooltip_text; color: UM.Theme.colors.button_tooltip_text;
} }
} }
}
UM.AngledCornerRectangle { UM.AngledCornerRectangle {
id: buttonFace; id: buttonFace;