From c021ad3b6196fa4b72d5d1c420ac2ad708296a68 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 27 Oct 2023 13:19:16 +0300 Subject: [PATCH] QmlDesigner: Make OriginGizmo nicer looking Reduce the size of the gizmo and adjust gizmo components accordingly. Colors were also adjusted. Fixes: QDS-11038 Change-Id: Ia1a01bf6e705cabf875dd5145d93af2a46196f0e Reviewed-by: Qt CI Patch Build Bot Reviewed-by: Mahmoud Badri --- .../mockfiles/qt6/EditCameraController.qml | 6 +++--- .../qml2puppet/mockfiles/qt6/OriginGizmo.qml | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/tools/qml2puppet/mockfiles/qt6/EditCameraController.qml b/src/tools/qml2puppet/mockfiles/qt6/EditCameraController.qml index 04856bc7631..3878e26c14a 100644 --- a/src/tools/qml2puppet/mockfiles/qt6/EditCameraController.qml +++ b/src/tools/qml2puppet/mockfiles/qt6/EditCameraController.qml @@ -258,9 +258,9 @@ Item { id: originGizmo anchors.right: parent.right anchors.top: parent.top - anchors.margins: 10 - width: 120 - height: 120 + anchors.margins: 4 + width: 70 + height: 70 targetNode: cameraCtrl.camera onAxisClicked: (axis) => { diff --git a/src/tools/qml2puppet/mockfiles/qt6/OriginGizmo.qml b/src/tools/qml2puppet/mockfiles/qt6/OriginGizmo.qml index b2658e32bf6..5054caccb19 100644 --- a/src/tools/qml2puppet/mockfiles/qt6/OriginGizmo.qml +++ b/src/tools/qml2puppet/mockfiles/qt6/OriginGizmo.qml @@ -36,22 +36,19 @@ Item { id: stylePalette property color brightBall: "#eeeeee" property color dimBall: "#111111" - property color xAxis: "#ff0000" - property color yAxis: "#00aa00" - property color zAxis: "#1515ff" + property color xAxis: "#ed324d" + property color yAxis: "#489600" + property color zAxis: "#0075cc" property color background: "#aa303030" } component LineRectangle : Rectangle { property vector2d startPoint: Qt.vector2d(0, 0) property vector2d endPoint: Qt.vector2d(0, 0) - property real lineWidth: 5 transformOrigin: Item.Left - height: lineWidth + height: 2 antialiasing: true - readonly property vector2d offset: startPoint.plus(endPoint).times(0.5); - width: startPoint.minus(endPoint).length() rotation: Math.atan2(endPoint.y - startPoint.y, endPoint.x - startPoint.x) * 180 / Math.PI } @@ -117,8 +114,11 @@ Item { Text { id: label - anchors.centerIn: parent + anchors.fill: parent antialiasing: true + font.pixelSize: 8 + horizontalAlignment: Qt.AlignHCenter + verticalAlignment: Qt.AlignVCenter } }