From e142f51e127561ef30757d4fe25d32e06d7b00cd Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 16 Feb 2017 14:29:37 +0100 Subject: [PATCH] Add tooltip for pre-heat input field Just to clarify what you need to put there. Contributes to issue CURA-3161. --- resources/qml/PrintMonitor.qml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/resources/qml/PrintMonitor.qml b/resources/qml/PrintMonitor.qml index dc51bbaf01..82f57c12da 100644 --- a/resources/qml/PrintMonitor.qml +++ b/resources/qml/PrintMonitor.qml @@ -204,7 +204,7 @@ Column return true; } border.width: UM.Theme.getSize("default_lining").width - border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : mouseArea.containsMouse ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border") + border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : preheatTemperatureMouseArea.containsMouse ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border") anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.bottom: parent.bottom @@ -230,10 +230,26 @@ Column } MouseArea //Change cursor on hovering. { - id: mouseArea + id: preheatTemperatureInputMouseArea hoverEnabled: true anchors.fill: parent cursorShape: Qt.IBeamCursor + + onHoveredChanged: + { + if (containsMouse) + { + base.showTooltip( + base, + {x: 0, y: preheatTemperatureInputMouseArea.mapToItem(base, 0, 0).y}, + catalog.i18nc("@tooltip of temperature input", "The temperature to pre-heat the bed to.") + ); + } + else + { + base.hideTooltip(); + } + } } TextInput {