QmlDesigner: Offset move/scale gizmo label in screen space

Offsetting in scene space resulted in label being inconsistent distance
away from the object, depending on zoom and angle.

Change-Id: Ief555de664c042bb1a5c93af0ee7e5a1c3e7ce0a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2019-11-25 17:24:59 +02:00
parent d076c59429
commit 05bb285b0d

View File

@@ -257,13 +257,12 @@ Window {
id: gizmoLabel
targetNode: moveGizmo.visible ? moveGizmo : scaleGizmo
targetView: overlayView
offset: Qt.vector3d(0, 45, 0)
visible: targetNode.dragging
Rectangle {
color: "white"
x: -width / 2
y: -height
y: -height - 8
width: gizmoLabelText.width + 4
height: gizmoLabelText.height + 4
border.width: 1