From ddbb952d9ce55bf2f528d6c9c9f0cca5d09dafd4 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 17 Jun 2015 17:43:03 +0200 Subject: [PATCH] Add a background to the tooltip label so long strings also have background Contributes to #57 --- resources/themes/cura/styles.qml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 243c12aedb..d172fdb6d0 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -103,12 +103,17 @@ QtObject { opacity: control.hovered ? 1.0 : 0.0; Behavior on opacity { NumberAnimation { duration: 100; } } - Label { - id: label + Rectangle { anchors.horizontalCenter: parent.horizontalCenter; - text: control.text.replace("&", ""); - font: UM.Theme.fonts.button_tooltip; - color: UM.Theme.colors.button_tooltip_text; + width: childrenRect.width; + height: childrenRect.height; + + Label { + id: label + text: control.text.replace("&", ""); + font: UM.Theme.fonts.button_tooltip; + color: UM.Theme.colors.button_tooltip_text; + } } }