From 5bfe61a59db6ce86e05e96fa6ffde16ab92cbb84 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 24 Mar 2011 16:31:24 +0100 Subject: [PATCH] QmlDesigner.propertyEditor: bug fix for color editing Task-Nr: QTCREATORBUG-4069 --- .../Qt/RectangleColorGroupBox.qml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleColorGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleColorGroupBox.qml index 4aa57d40879..9f101175bb0 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleColorGroupBox.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleColorGroupBox.qml @@ -13,6 +13,31 @@ GroupBox { property bool hasBorder + property variant colorAlpha: colorGroupBox.alpha + property bool hasGradient: backendValues.gradient.isInModel + + onHasGradientChanged: { + print("onGradientInModelChanged") + if (backendValues.gradient.isInModel) { + print("inmodel") + colorGroupBox.setGradientButtonChecked = true; + } else { + print("else") + if (colorGroupBox.alpha == 0) + colorGroupBox.setNoneButtonChecked = true; + else + colorGroupBox.setSolidButtonChecked = true; + } + } + + onColorAlphaChanged: { + if (backendValues.gradient.isInModel) + return + if (colorGroupBox.alpha == 0) + colorGroupBox.setNoneButtonChecked = true; + else + colorGroupBox.setSolidButtonChecked = true; + } onSelectionFlagChanged: { isSetup = true;