diff --git a/resources/qml/SidebarTooltip.qml b/resources/qml/SidebarTooltip.qml index 93075209ea..c51a33c611 100644 --- a/resources/qml/SidebarTooltip.qml +++ b/resources/qml/SidebarTooltip.qml @@ -8,13 +8,15 @@ import QtQuick.Layouts 1.1 import UM 1.0 as UM -Rectangle { +UM.PointingRectangle { id: base; width: UM.Theme.sizes.tooltip.width; height: label.height + UM.Theme.sizes.tooltip_margins.height * 2; color: UM.Theme.colors.tooltip; + arrowSize: UM.Theme.sizes.default_arrow.width + opacity: 0; Behavior on opacity { NumberAnimation { duration: 100; } } @@ -26,9 +28,10 @@ Rectangle { y = parent.height - base.height; } else { x = position.x - base.width; - y = position.y; + y = position.y - UM.Theme.sizes.tooltip_arrow_margins.height; } base.opacity = 1; + target = Qt.point(40 , position.y) } function hide() { @@ -47,6 +50,6 @@ Rectangle { } wrapMode: Text.Wrap; font: UM.Theme.fonts.default; - color: UM.Theme.colors.text; + color: UM.Theme.colors.tooltip_text; } } diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index dad5f8b2a6..0e1ec8c0cc 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -104,7 +104,7 @@ QtObject { target: Qt.point(parent.x, y + height/2) arrowSize: UM.Theme.sizes.button_tooltip_arrow.width - color: UM.Theme.colors.button_tooltip_border + color: UM.Theme.colors.tooltip opacity: control.hovered ? 1.0 : 0.0; width: control.hovered ? button_tip.width + UM.Theme.sizes.button_tooltip.width : 0 @@ -113,14 +113,6 @@ QtObject { Behavior on width { NumberAnimation { duration: 100; } } Behavior on opacity { NumberAnimation { duration: 100; } } - UM.PointingRectangle { - color: UM.Theme.colors.button_tooltip; - anchors.fill: parent - anchors.margins: UM.Theme.sizes.default_lining.width - target: Qt.point(-UM.Theme.sizes.default_lining.width, parent.height/2) - arrowSize: parent.arrowSize - } - Label { id: button_tip @@ -129,7 +121,7 @@ QtObject { text: control.text; font: UM.Theme.fonts.button_tooltip; - color: UM.Theme.colors.button_tooltip_text; + color: UM.Theme.colors.tooltip_text; } } diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index f3f865d63e..333f937ed5 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -149,7 +149,8 @@ "checkbox_mark": [24, 41, 77, 255], "checkbox_text": [24, 41, 77, 255], - "tooltip": [255, 225, 146, 255], + "tooltip": [12, 169, 227, 255], + "tooltip_text": [255, 255, 255, 255], "message_background": [255, 255, 255, 255], "message_text": [32, 166, 219, 255], @@ -218,6 +219,7 @@ "tooltip": [20.0, 10.0], "tooltip_margins": [1.0, 1.0], + "tooltip_arrow_margins": [2.0, 2.0], "save_button_text_margin": [0.3, 0.6], "save_button_slicing_bar": [0.0, 2.2],