forked from qt-creator/qt-creator
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:
@@ -257,13 +257,12 @@ Window {
|
|||||||
id: gizmoLabel
|
id: gizmoLabel
|
||||||
targetNode: moveGizmo.visible ? moveGizmo : scaleGizmo
|
targetNode: moveGizmo.visible ? moveGizmo : scaleGizmo
|
||||||
targetView: overlayView
|
targetView: overlayView
|
||||||
offset: Qt.vector3d(0, 45, 0)
|
|
||||||
visible: targetNode.dragging
|
visible: targetNode.dragging
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: "white"
|
color: "white"
|
||||||
x: -width / 2
|
x: -width / 2
|
||||||
y: -height
|
y: -height - 8
|
||||||
width: gizmoLabelText.width + 4
|
width: gizmoLabelText.width + 4
|
||||||
height: gizmoLabelText.height + 4
|
height: gizmoLabelText.height + 4
|
||||||
border.width: 1
|
border.width: 1
|
||||||
|
Reference in New Issue
Block a user