aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrook Cronin <brook.cronin@qt.io>2024-02-02 13:44:42 +0100
committerBrook Cronin <brook.cronin@qt.io>2024-02-02 13:19:09 +0000
commitd83eeb0b8fcffe1c2e5ee0848a723b7e0c71e687 (patch)
treeed9d9c0d297a9cf5cec5051d146ada7fc0e6cc3c
parent916b78aa49806aa79c33446640656268eab468f9 (diff)
Qml Designer: Add uniform cell size properties to layouts
Change-Id: If2e0958c124cff259b1dbea57dd798711f0a0f1d Reviewed-by: Pranta Ghosh Dastider <pranta.dastider@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/ColumnLayoutSpecifics.qml17
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/GridLayoutSpecifics.qml29
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/RowLayoutSpecifics.qml17
3 files changed, 63 insertions, 0 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/ColumnLayoutSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/ColumnLayoutSpecifics.qml
index 7cdb040956..2072f13a8e 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/ColumnLayoutSpecifics.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/ColumnLayoutSpecifics.qml
@@ -44,5 +44,22 @@ Section {
ExpandingSpacer {}
}
+
+ PropertyLabel {
+ text: qsTr("Uniform cell size")
+ tooltip: qsTr("Toggles all cells to have a uniform size.")
+ visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
+ }
+
+ SecondColumnLayout {
+ CheckBox {
+ implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ + StudioTheme.Values.actionIndicatorWidth
+ backendValue: backendValues.uniformCellSizes
+ visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
+ }
+
+ ExpandingSpacer {}
+ }
}
}
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/GridLayoutSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/GridLayoutSpecifics.qml
index 3743769353..8eea143542 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/GridLayoutSpecifics.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/GridLayoutSpecifics.qml
@@ -113,5 +113,34 @@ Section {
ExpandingSpacer {}
}
+
+ PropertyLabel {
+ text: qsTr("Uniform cell sizes")
+ tooltip: qsTr("Toggles all cells to have a uniform height or width.")
+ visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
+ }
+
+ SecondColumnLayout {
+ CheckBox {
+ text: qsTr("Heights")
+ implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ + StudioTheme.Values.actionIndicatorWidth
+ backendValue: backendValues.uniformCellHeights
+ visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
+ }
+
+ Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
+
+ CheckBox {
+ text: qsTr("Widths")
+ implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ + StudioTheme.Values.actionIndicatorWidth
+ backendValue: backendValues.uniformCellWidths
+ visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
+ }
+
+ ExpandingSpacer {}
+ }
}
}
+
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/RowLayoutSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/RowLayoutSpecifics.qml
index c1abe023a4..b4a2ced1cd 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/RowLayoutSpecifics.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Layouts/RowLayoutSpecifics.qml
@@ -44,5 +44,22 @@ Section {
ExpandingSpacer {}
}
+
+ PropertyLabel {
+ text: qsTr("Uniform cell size")
+ tooltip: qsTr("Toggles all cells to have a uniform size.")
+ visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
+ }
+ SecondColumnLayout {
+ CheckBox {
+ implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ + StudioTheme.Values.actionIndicatorWidth
+ backendValue: backendValues.uniformCellSizes
+ visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
+ }
+
+ ExpandingSpacer {}
+ }
}
}
+