From f956436c3232a8adaf49438c2a787ee017de7f84 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 16 Feb 2017 15:02:48 +0100 Subject: [PATCH] Align tooltips better We want the tooltip area to point at the vertical centre. However, we want the tooltip of pure text elements to point at the vertical centre between the base line and the middle line (centre of lowercase letters). Therefore the offset for those elements is a quarter of the height rather than half (which is good enough of an approximation). Contributes to issue CURA-3161. --- resources/qml/PrintMonitor.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/qml/PrintMonitor.qml b/resources/qml/PrintMonitor.qml index f36befa607..ddbfac0e4f 100644 --- a/resources/qml/PrintMonitor.qml +++ b/resources/qml/PrintMonitor.qml @@ -115,7 +115,7 @@ Column { base.showTooltip( base, - {x: 0, y: parent.mapToItem(base, 0, 0).y}, + {x: 0, y: parent.mapToItem(base, 0, -parent.height / 4).y}, catalog.i18nc("@tooltip", "The current temperature of this extruder.") ); } @@ -150,7 +150,7 @@ Column { base.showTooltip( base, - {x: 0, y: parent.mapToItem(base, 0, 0).y}, + {x: 0, y: parent.mapToItem(base, 0, -parent.height / 2).y}, catalog.i18nc("@tooltip", "The colour of the material in this extruder.") ); } @@ -214,7 +214,7 @@ Column { base.showTooltip( base, - {x: 0, y: parent.mapToItem(base, 0, 0).y}, + {x: 0, y: parent.mapToItem(base, 0, -parent.height / 4).y}, catalog.i18nc("@tooltip", "The nozzle inserted in this extruder.") ); } @@ -274,7 +274,7 @@ Column { base.showTooltip( base, - {x: 0, y: bedTargetTemperature.mapToItem(base, 0, 0).y}, + {x: 0, y: bedTargetTemperature.mapToItem(base, 0, -parent.height / 4).y}, catalog.i18nc("@tooltip", "The target temperature of the heated bed. The bed will heat up or cool down towards this temperature. If this is 0, the bed heating is turned off.") ); } @@ -306,7 +306,7 @@ Column { base.showTooltip( base, - {x: 0, y: bedCurrentTemperature.mapToItem(base, 0, 0).y}, + {x: 0, y: bedCurrentTemperature.mapToItem(base, 0, -parent.height / 4).y}, catalog.i18nc("@tooltip", "The current temperature of the heated bed.") ); }