forked from qt-creator/qt-creator
QmlDesigner: Enable MCU Gradients in ColorEditor
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>
(cherry picked from commit 09dcb1d730
)
This commit is contained in:
@@ -38,6 +38,10 @@ SecondColumnLayout {
|
|||||||
property alias showHexTextField: hexTextField.visible
|
property alias showHexTextField: hexTextField.visible
|
||||||
|
|
||||||
property bool shapeGradients: false
|
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 color originalColor
|
||||||
property bool isVector3D: false
|
property bool isVector3D: false
|
||||||
|
|
||||||
@@ -235,6 +239,7 @@ SecondColumnLayout {
|
|||||||
|
|
||||||
sourceComponent: ColorEditorPopup {
|
sourceComponent: ColorEditorPopup {
|
||||||
shapeGradients: colorEditor.shapeGradients
|
shapeGradients: colorEditor.shapeGradients
|
||||||
|
mcuGradients: colorEditor.mcuGradients
|
||||||
supportGradient: colorEditor.supportGradient
|
supportGradient: colorEditor.supportGradient
|
||||||
width: popupDialog.contentWidth
|
width: popupDialog.contentWidth
|
||||||
visible: popupDialog.visible
|
visible: popupDialog.visible
|
||||||
|
@@ -16,6 +16,10 @@ Column {
|
|||||||
|
|
||||||
property bool supportGradient: false
|
property bool supportGradient: false
|
||||||
property bool shapeGradients: 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 gradientLine: gradientLine
|
||||||
property alias popupHexTextField: popupHexTextField
|
property alias popupHexTextField: popupHexTextField
|
||||||
property alias gradientPropertyName: root.gradientModel.gradientPropertyName
|
property alias gradientPropertyName: root.gradientModel.gradientPropertyName
|
||||||
@@ -224,12 +228,12 @@ Column {
|
|||||||
ceMode.items.append({
|
ceMode.items.append({
|
||||||
value: "RadialGradient",
|
value: "RadialGradient",
|
||||||
text: qsTr("Radial"),
|
text: qsTr("Radial"),
|
||||||
enabled: root.supportGradient && root.shapeGradients
|
enabled: root.supportGradient && root.shapeGradients && !root.mcuGradients
|
||||||
})
|
})
|
||||||
ceMode.items.append({
|
ceMode.items.append({
|
||||||
value: "ConicalGradient",
|
value: "ConicalGradient",
|
||||||
text: qsTr("Conical"),
|
text: qsTr("Conical"),
|
||||||
enabled: root.supportGradient && root.shapeGradients
|
enabled: root.supportGradient && root.shapeGradients && !root.mcuGradients
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user