From e936ef2fdbbe9e32ea701bc6d6a18463dc08e248 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 20 Sep 2022 16:14:51 +0300 Subject: [PATCH] QmlDesigner: Reduce vertical gap between vector fields This helps to differentiate which fields belong to which property when multiple vertor properties are added next to each other. Fixes: QDS-7704 Change-Id: I885e6d3d12a11851668e7c4d66f94f3356e5f082 Reviewed-by: Mahmoud Badri --- .../Vector2dEditorTemplate.template | 68 +++++++++---------- .../Vector3dEditorTemplate.template | 1 + .../Vector4dEditorTemplate.template | 1 + .../DynamicPropertiesSection.qml | 2 +- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/PropertyTemplates/Vector2dEditorTemplate.template b/share/qtcreator/qmldesigner/propertyEditorQmlSources/PropertyTemplates/Vector2dEditorTemplate.template index b339c254bac..ab2eb508d17 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/PropertyTemplates/Vector2dEditorTemplate.template +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/PropertyTemplates/Vector2dEditorTemplate.template @@ -3,40 +3,38 @@ PropertyLabel { tooltip: "%1" } -ColumnLayout { - SecondColumnLayout { - SpinBox { - minimumValue: -9999999 - maximumValue: 9999999 - decimals: 2 - backendValue: backendValues.%2_x - implicitWidth: StudioTheme.Values.twoControlColumnWidth - + StudioTheme.Values.actionIndicatorWidth - } - - Spacer { implicitWidth: StudioTheme.Values.controlLabelGap } - - ControlLabel { - text: "X" - } - - Spacer { implicitWidth: StudioTheme.Values.controlGap } - - SpinBox { - minimumValue: -9999999 - maximumValue: 9999999 - decimals: 2 - backendValue: backendValues.%2_y - implicitWidth: StudioTheme.Values.twoControlColumnWidth - + StudioTheme.Values.actionIndicatorWidth - } - - Spacer { implicitWidth: StudioTheme.Values.controlLabelGap } - - ControlLabel { - text: "Y" - } - - ExpandingSpacer {} +SecondColumnLayout { + SpinBox { + minimumValue: -9999999 + maximumValue: 9999999 + decimals: 2 + backendValue: backendValues.%2_x + implicitWidth: StudioTheme.Values.twoControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth } + + Spacer { implicitWidth: StudioTheme.Values.controlLabelGap } + + ControlLabel { + text: "X" + } + + Spacer { implicitWidth: StudioTheme.Values.controlGap } + + SpinBox { + minimumValue: -9999999 + maximumValue: 9999999 + decimals: 2 + backendValue: backendValues.%2_y + implicitWidth: StudioTheme.Values.twoControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + } + + Spacer { implicitWidth: StudioTheme.Values.controlLabelGap } + + ControlLabel { + text: "Y" + } + + ExpandingSpacer {} } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/PropertyTemplates/Vector3dEditorTemplate.template b/share/qtcreator/qmldesigner/propertyEditorQmlSources/PropertyTemplates/Vector3dEditorTemplate.template index 5caff585d73..c5be9374741 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/PropertyTemplates/Vector3dEditorTemplate.template +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/PropertyTemplates/Vector3dEditorTemplate.template @@ -4,6 +4,7 @@ PropertyLabel { } ColumnLayout { + spacing: StudioTheme.Values.sectionRowSpacing / 2 SecondColumnLayout { SpinBox { minimumValue: -9999999 diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/PropertyTemplates/Vector4dEditorTemplate.template b/share/qtcreator/qmldesigner/propertyEditorQmlSources/PropertyTemplates/Vector4dEditorTemplate.template index 619f51cebe3..0fd6cb9f7f1 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/PropertyTemplates/Vector4dEditorTemplate.template +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/PropertyTemplates/Vector4dEditorTemplate.template @@ -4,6 +4,7 @@ PropertyLabel { } ColumnLayout { + spacing: StudioTheme.Values.sectionRowSpacing / 2 SecondColumnLayout { SpinBox { minimumValue: -9999999 diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/DynamicPropertiesSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/DynamicPropertiesSection.qml index 4bd99e3f68e..2a0580edf14 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/DynamicPropertiesSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/DynamicPropertiesSection.qml @@ -297,7 +297,7 @@ Section { onVecSizeChanged: updateProxyValues() - spacing: StudioTheme.Values.sectionRowSpacing + spacing: StudioTheme.Values.sectionRowSpacing / 2 function isValidValue(v) { return !(v === undefined || isNaN(v))