aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksei German <aleksei.german@qt.io>2024-05-03 17:55:21 +0200
committerAleksei German <aleksei.german@qt.io>2024-05-03 16:15:56 +0000
commit09dcb1d7306509f4340e8c8142f03dd9afc041ba (patch)
treede18cddd95f359ec78e1f74a9d3d48186cea752a
parent77827660e15bf5c4c000b909d7bca8adc5597f14 (diff)
QmlDesigner: Enable MCU Gradients in ColorEditorqds/dev
Specifics using ColorEditor should be able to use new MCUs-specific property Task-number: QDS-12691 Change-Id: If4d6b1241744ccbc7a9df8b7752ce4ab40502d43 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml5
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditorPopup.qml8
2 files changed, 11 insertions, 2 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml
index 4b4d2b8dc6..a695d16dd9 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml
@@ -38,6 +38,10 @@ SecondColumnLayout {
property alias showHexTextField: hexTextField.visible
property bool shapeGradients: false
+
+ //for now, gradients on MCUs are limited to Basic and Shape Linear Gradient:
+ property bool mcuGradients: false
+
property color originalColor
property bool isVector3D: false
@@ -235,6 +239,7 @@ SecondColumnLayout {
sourceComponent: ColorEditorPopup {
shapeGradients: colorEditor.shapeGradients
+ mcuGradients: colorEditor.mcuGradients
supportGradient: colorEditor.supportGradient
width: popupDialog.contentWidth
visible: popupDialog.visible
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditorPopup.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditorPopup.qml
index 22be367c37..d3ad19ad85 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditorPopup.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditorPopup.qml
@@ -16,6 +16,10 @@ Column {
property bool supportGradient: false
property bool shapeGradients: false
+
+ //for now, gradients on MCUs are limited to Basic and Shape Linear Gradient:
+ property bool mcuGradients: false
+
property alias gradientLine: gradientLine
property alias popupHexTextField: popupHexTextField
property alias gradientPropertyName: root.gradientModel.gradientPropertyName
@@ -224,12 +228,12 @@ Column {
ceMode.items.append({
value: "RadialGradient",
text: qsTr("Radial"),
- enabled: root.supportGradient && root.shapeGradients
+ enabled: root.supportGradient && root.shapeGradients && !root.mcuGradients
})
ceMode.items.append({
value: "ConicalGradient",
text: qsTr("Conical"),
- enabled: root.supportGradient && root.shapeGradients
+ enabled: root.supportGradient && root.shapeGradients && !root.mcuGradients
})
}