From a32c00141ac28ff116ed11eb2b10f77f989cf812 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 4 Apr 2016 11:33:37 +0200 Subject: [PATCH] Apply style to rotate-tool tooltip See https://github.com/Ultimaker/Cura/issues/685 CURA-1143 --- resources/qml/Cura.qml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 07d28f435d..a06d68bead 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -525,17 +525,22 @@ UM.MainWindow Rectangle { - x: base.mouseX + UM.Theme.getSize("default_margin").width; - y: base.mouseY + UM.Theme.getSize("default_margin").height; + x: base.mouseX + UM.Theme.getSize("default_margin").width + y: base.mouseY + UM.Theme.getSize("default_margin").height - width: childrenRect.width; + width: childrenRect.width + UM.Theme.getSize("default_margin").width height: childrenRect.height; + color: UM.Theme.getColor("tooltip") Label { - text: UM.ActiveTool.properties.getValue("Rotation") != undefined ? "%1°".arg(UM.ActiveTool.properties.getValue("Rotation")) : ""; + id: rotationLabel + text: UM.ActiveTool.properties.getValue("Rotation") != undefined ? "%1°".arg(UM.ActiveTool.properties.getValue("Rotation")) : "" + color: UM.Theme.getColor("tooltip_text") + font: UM.Theme.getFont("default") + anchors.horizontalCenter: parent.horizontalCenter } - visible: UM.ActiveTool.valid && UM.ActiveTool.properties.Rotation != undefined; + visible: rotationLabel.text != ""; } } }