From cfb64f00d67c88e345af7988988a27a858014a47 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 14 Apr 2020 18:17:15 +0200 Subject: [PATCH] QmlDesigner: Add support for more AuxiliaryData in property editor Change-Id: If5e5b7b52da991f6aa488715d99c36f4499696d8 Reviewed-by: Tim Jenssen --- .../propertyeditorqmlbackend.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp index 55ad0fb3535..56202a2596b 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp @@ -144,10 +144,17 @@ QVariant properDefaultAuxiliaryProperties(const QmlObjectNode &qmlObjectNode, if (node.hasAuxiliaryData(auxName)) return node.auxiliaryData(auxName); - - if (propertyName == "color") + if (propertyName == "transitionColor") return QColor(Qt::red); - if (propertyName == "fillColor") + if (propertyName == "areaColor") + return QColor(Qt::red); + if (propertyName == "blockColor") + return QColor(Qt::red); + if (propertyName == "areaFillColor") + return QColor(Qt::transparent); + else if (propertyName == "color") + return QColor(Qt::red); + else if (propertyName == "fillColor") return QColor(Qt::transparent); else if (propertyName == "width") return 4; @@ -233,6 +240,12 @@ void PropertyEditorQmlBackend::setupAuxiliaryProperties(const QmlObjectNode &qml propertyNames.append({"color", "width", "inOffset", "outOffset", "joinConnection"}); } else if (itemNode.isFlowActionArea()) { propertyNames.append({"color", "width", "fillColor", "outOffset", "dash"}); + } else if (itemNode.isFlowDecision()) { + propertyNames.append({"color", "width", "fillColor", "dash"}); + } else if (itemNode.isFlowWildcard()) { + propertyNames.append({"color", "width", "fillColor", "dash"}); + } else if (itemNode.isFlowView()) { + propertyNames.append({"transitionColor", "areaColor", "areaFillColor", "blockColor" }); } for (const PropertyName &propertyName : propertyNames) {