QmlDesigner: Fix GradientLine tooltip

Change-Id: I88bf3425b4ade5a80d49bb34744248431eec5128
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Henning Gruendl
2020-04-09 14:09:14 +02:00
committed by Henning Gründl
parent a53308cde6
commit 46481bd884

View File

@@ -223,6 +223,10 @@ Item {
} }
} }
Tooltip {
id: myTooltip
}
Component { Component {
id: component id: component
Item { Item {
@@ -241,9 +245,9 @@ Item {
if (showToolTip) { if (showToolTip) {
var currentPoint = Qt.point(gradientStopHandleMouseArea.mouseX, gradientStopHandleMouseArea.mouseY); var currentPoint = Qt.point(gradientStopHandleMouseArea.mouseX, gradientStopHandleMouseArea.mouseY);
var fixedGradiantStopPosition = currentGradiantStopPosition(); var fixedGradiantStopPosition = currentGradiantStopPosition();
Tooltip.showText(gradientStopHandleMouseArea, currentPoint, fixedGradiantStopPosition.toFixed(3)); myTooltip.showText(gradientStopHandleMouseArea, currentPoint, fixedGradiantStopPosition.toFixed(3));
} else { } else {
Tooltip.hideText() myTooltip.hideText()
} }
} }
function currentGradiantStopPosition() { function currentGradiantStopPosition() {