QmlDesigner: Enable Layouts in MCUs config

Pick-to: qds/4.5
Task-number: QDS-11663
Change-Id: I8d5ffb9d44696e7d286561e295ecaeb0d96ca6a7
Reviewed-by: Aleksei German <aleksei.german@qt.io>
This commit is contained in:
Aleksei German
2024-06-13 17:48:10 +02:00
parent 1e7ab9e63c
commit ceb5950573
5 changed files with 43 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
id: root
anchors.left: parent.left
anchors.right: parent.right
caption: qsTr("Column Layout")
@@ -50,9 +51,10 @@ Section {
}
PropertyLabel {
text: qsTr("Uniform cell size")
text: qsTr("Uniform cell sizes")
tooltip: qsTr("Toggles all cells to have a uniform size.")
visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
blockedByTemplate: !backendValues.uniformCellSizes.isAvailable
}
SecondColumnLayout {
@@ -61,6 +63,7 @@ Section {
+ StudioTheme.Values.actionIndicatorWidth
backendValue: backendValues.uniformCellSizes
visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
enabled: backendValues.uniformCellSizes.isAvailable
}
ExpandingSpacer {}

View File

@@ -7,6 +7,7 @@ import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
id: root
anchors.left: parent.left
anchors.right: parent.right
caption: qsTr("Grid Layout")
@@ -131,6 +132,8 @@ Section {
text: qsTr("Uniform cell sizes")
tooltip: qsTr("Toggles all cells to have a uniform height or width.")
visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
blockedByTemplate: !(backendValues.uniformCellHeights.isAvailable
&& backendValues.uniformCellWidths.isAvailable)
}
SecondColumnLayout {
@@ -140,6 +143,7 @@ Section {
+ StudioTheme.Values.actionIndicatorWidth
backendValue: backendValues.uniformCellHeights
visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
enabled: backendValues.uniformCellHeights.isAvailable
}
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
@@ -150,6 +154,7 @@ Section {
+ StudioTheme.Values.actionIndicatorWidth
backendValue: backendValues.uniformCellWidths
visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
enabled: backendValues.uniformCellWidths.isAvailable
}
ExpandingSpacer {}

View File

@@ -7,6 +7,7 @@ import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
id: root
anchors.left: parent.left
anchors.right: parent.right
caption: qsTr("Row Layout")
@@ -50,16 +51,19 @@ Section {
}
PropertyLabel {
text: qsTr("Uniform cell size")
text: qsTr("Uniform cell sizes")
tooltip: qsTr("Toggles all cells to have a uniform size.")
visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
blockedByTemplate: !backendValues.uniformCellSizes.isAvailable
}
SecondColumnLayout {
CheckBox {
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
backendValue: backendValues.uniformCellSizes
visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
enabled: backendValues.uniformCellSizes.isAvailable
}
ExpandingSpacer {}

View File

@@ -45,6 +45,8 @@ VersionData {
"QtQuick.Controls.ToolButton",
"QtQuick.Controls.ToolSeparator",
"QtQuick.Controls.Tumbler",
"QtQuick.Layouts.LayoutItemProxy",
"QtQuick.Layouts.StackLayout",
"QtQuick.Shapes.ConicalGradient",
"QtQuick.Shapes.RadialGradient"
]
@@ -52,6 +54,7 @@ VersionData {
allowedImports: [
"QtQuick",
"QtQuick.Controls",
"QtQuick.Layouts",
"QtQuick.Shapes",
"QtQuick.Timeline",
"QtQuickUltralite.Extras",
@@ -185,6 +188,30 @@ VersionData {
bannedProperties: ["live", "snapMode", "touchDragThreshold"]
}
ComplexProperty {
prefix: "Layout"
bannedProperties: ["horizontalStretchFactor", "verticalStretchFactor"]
}
QtQuick.Layouts.Layout {
bannedProperties: ["horizontalStretchFactor", "verticalStretchFactor"]
}
QtQuick.Layouts.ColumnLayout {
allowedProperties: ["layoutDirection"]
bannedProperties: ["uniformCellSizes"]
}
QtQuick.Layouts.RowLayout {
allowedProperties: ["layoutDirection"]
bannedProperties: ["uniformCellSizes"]
}
QtQuick.Layouts.GridLayout {
allowedProperties: ["layoutDirection"]
bannedProperties: ["uniformCellHeights", "uniformCellWidths"]
}
//Path and Shapes related:
QtQuick.Path {

View File

@@ -56,7 +56,8 @@ Project {
"Timeline",
"Shapes",
"Profiling",
"StudioComponents"
"StudioComponents",
"Layouts"
]
}