From b3bd488c07bffec191a96dfdab564d176e2188ab Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 10 Feb 2017 14:40:31 +0100 Subject: [PATCH] Use stylised tooltip for pre-heat button Took some figuring out, this one... But it works. Contributes to issue CURA-3161. --- resources/qml/PrintMonitor.qml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/resources/qml/PrintMonitor.qml b/resources/qml/PrintMonitor.qml index cf15973c11..bead30d85b 100644 --- a/resources/qml/PrintMonitor.qml +++ b/resources/qml/PrintMonitor.qml @@ -315,7 +315,6 @@ Column Button //The pre-heat button. { id: preheatButton - tooltip: catalog.i18nc("@tooltip of pre-heat", "Heat the bed in advance before printing. You can continue adjusting your print while it is heating, and you won't have to wait for the bed to heat up when you're ready to print.") height: UM.Theme.getSize("setting_control").height enabled: { @@ -447,6 +446,22 @@ Column preheatCountdownTimer.update(); } } + + onHoveredChanged: + { + if (hovered) + { + base.showTooltip( + base, + {x: 0, y: preheatButton.mapToItem(base, 0, 0).y}, + catalog.i18nc("@tooltip of pre-heat", "Heat the bed in advance before printing. You can continue adjusting your print while it is heating, and you won't have to wait for the bed to heat up when you're ready to print.") + ); + } + else + { + base.hideTooltip(); + } + } } }