diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomComboBoxStyle.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomComboBoxStyle.qml index 6be6b7d4652..4f5600a0101 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomComboBoxStyle.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomComboBoxStyle.qml @@ -54,7 +54,7 @@ ComboBoxStyle { } Rectangle { - color: "#333" + color: creatorTheme.IconsBaseColor width: 1 anchors.right: imageItem.left anchors.topMargin: 4 @@ -66,11 +66,13 @@ ComboBoxStyle { Image { id: imageItem - source: "images/down-arrow.png" + width: 8 + height: 4 + source: "image://icons/down-arrow" anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right - anchors.rightMargin: 10 - opacity: control.enabled ? 0.7 : 0.5 + anchors.rightMargin: 8 + opacity: control.enabled ? 1 : 0.5 } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomSpinBoxStyle.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomSpinBoxStyle.qml index 0130b4ca5aa..82adcd00e4d 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomSpinBoxStyle.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomSpinBoxStyle.qml @@ -43,7 +43,9 @@ SpinBoxStyle { implicitHeight: parent.height/2 opacity: styleData.upEnabled ? styleData.upPressed ? 0.5 : 1 : 0.5 Image { - source: "images/up-arrow.png" + width: 8 + height: 4 + source: "image://icons/up-arrow" x: 1 y: 5 } @@ -54,7 +56,9 @@ SpinBoxStyle { implicitHeight: parent.height/2 opacity: styleData.downEnabled ? styleData.downPressed ? 0.5 : 1 : 0.5 Image { - source: "images/down-arrow.png" + width: 8 + height: 4 + source: "image://icons/down-arrow" x: 1 y: 2.5 // Hack! Spinbox sets an non-int offset, somewhere } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ExtendedFunctionButton.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ExtendedFunctionButton.qml index 687d4d69231..0e795d190b4 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ExtendedFunctionButton.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ExtendedFunctionButton.qml @@ -37,26 +37,25 @@ Item { property variant backendValue - property string icon: "images/placeholder.png" - property string hoverIcon: "images/submenu.png"; + property string icon: "image://icons/placeholder" + property string hoverIcon: "image://icons/submenu" property bool active: true function setIcon() { if (backendValue == null) { - extendedFunctionButton.icon = "images/placeholder.png" + extendedFunctionButton.icon = "image://icons/placeholder" } else if (backendValue.isBound ) { if (backendValue.isTranslated) { //translations are a special case - extendedFunctionButton.icon = "images/placeholder.png" + extendedFunctionButton.icon = "image://icons/placeholder" } else { - extendedFunctionButton.icon = "images/expression.png" + extendedFunctionButton.icon = "image://icons/expression" } } else { if (backendValue.complexNode != null && backendValue.complexNode.exists) { - //extendedFunctionButton.icon = "images/behaivour.png" } else { - extendedFunctionButton.icon = "images/placeholder.png" + extendedFunctionButton.icon = "image://icons/placeholder" } } } @@ -86,6 +85,8 @@ Item { } Image { + width: 14 + height: 14 source: extendedFunctionButton.icon anchors.centerIn: parent } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/Section.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/Section.qml index 4d38c857f2a..3d185399956 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/Section.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/Section.qml @@ -55,12 +55,15 @@ Item { Image { id: arrow - source: "images/down-arrow.png" + width: 8 + height: 4 + source: "image://icons/down-arrow" anchors.left: parent.left anchors.leftMargin: 4 anchors.verticalCenter: parent.verticalCenter Behavior on rotation { NumberAnimation { + easing.type: Easing.OutCubic duration: animationDuration } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/down-arrow.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/down-arrow.png index 5780560f7d2..a28f1e3713c 100644 Binary files a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/down-arrow.png and b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/down-arrow.png differ diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/down-arrow@2x.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/down-arrow@2x.png index 684a03ab502..6246fc2c29e 100644 Binary files a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/down-arrow@2x.png and b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/down-arrow@2x.png differ diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/expression.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/expression.png index 93754ed8e25..d13cf9fad9f 100644 Binary files a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/expression.png and b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/expression.png differ diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/expression@2x.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/expression@2x.png index 560c7e2d5a9..56244287a5e 100644 Binary files a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/expression@2x.png and b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/expression@2x.png differ diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/placeholder.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/placeholder.png index 1321327dc4e..ae22d32b6e0 100644 Binary files a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/placeholder.png and b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/placeholder.png differ diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/placeholder@2x.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/placeholder@2x.png index abe5d8aa9a6..305619812d9 100644 Binary files a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/placeholder@2x.png and b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/placeholder@2x.png differ diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/submenu.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/submenu.png index 4e7b5484850..18be756dec4 100644 Binary files a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/submenu.png and b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/submenu.png differ diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/submenu@2x.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/submenu@2x.png index 49d77d15f38..58d6320b77d 100644 Binary files a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/submenu@2x.png and b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/submenu@2x.png differ diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/up-arrow.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/up-arrow.png index 42934bfad0f..13792106852 100644 Binary files a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/up-arrow.png and b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/up-arrow.png differ diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/up-arrow@2x.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/up-arrow@2x.png index 455c36f2f5b..2f2fc059557 100644 Binary files a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/up-arrow@2x.png and b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/up-arrow@2x.png differ diff --git a/src/plugins/qmldesigner/components/componentcore/qmldesignericonprovider.cpp b/src/plugins/qmldesigner/components/componentcore/qmldesignericonprovider.cpp index dccde246337..04db689f4c1 100644 --- a/src/plugins/qmldesigner/components/componentcore/qmldesignericonprovider.cpp +++ b/src/plugins/qmldesigner/components/componentcore/qmldesignericonprovider.cpp @@ -26,6 +26,9 @@ #include "qmldesignericonprovider.h" #include +#include + +#include namespace QmlDesigner { @@ -35,10 +38,30 @@ QmlDesignerIconProvider::QmlDesignerIconProvider() } +static QString iconPath() +{ + return Core::ICore::resourcePath() + QLatin1String("/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/"); +} + QPixmap QmlDesignerIconProvider::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) { Q_UNUSED(requestedSize) + static Utils::Icon UP_ARROW({ + { iconPath() + QLatin1String("up-arrow.png"), Utils::Theme::IconsBaseColor}}); + + static Utils::Icon DOWN_ARROW({ + { iconPath() + QLatin1String("down-arrow.png"), Utils::Theme::IconsBaseColor}}); + + static Utils::Icon PLACEHOLDER({ + { iconPath() + QLatin1String("placeholder.png"), Utils::Theme::IconsBaseColor}}); + + static Utils::Icon EXPRESSION({ + { iconPath() + QLatin1String("expression.png"), Utils::Theme::IconsBaseColor}}); + + static Utils::Icon SUBMENU({ + { iconPath() + QLatin1String("submenu.png"), Utils::Theme::IconsBaseColor}}); + QPixmap result; if (id == "close") @@ -46,6 +69,20 @@ QPixmap QmlDesignerIconProvider::requestPixmap(const QString &id, QSize *size, c else if (id == "plus") result = Core::Icons::PLUS.pixmap(); + else if (id == "expression") + result = EXPRESSION.pixmap(); + else if (id == "placeholder") + result = PLACEHOLDER.pixmap(); + else if (id == "expression") + result = EXPRESSION.pixmap(); + else if (id == "submenu") + result = SUBMENU.pixmap(); + else if (id == "up-arrow") + result = UP_ARROW.pixmap(); + else if (id == "down-arrow") + result = DOWN_ARROW.pixmap(); + else + qWarning() << Q_FUNC_INFO << "Image not found."; if (size) *size = result.size(); diff --git a/src/tools/icons/qtcreatoricons.svg b/src/tools/icons/qtcreatoricons.svg index 74c58ce6e25..ef2b3bbce2b 100644 --- a/src/tools/icons/qtcreatoricons.svg +++ b/src/tools/icons/qtcreatoricons.svg @@ -1482,18 +1482,25 @@ + + style="fill:#000000;fill-opacity:1.0;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> - + style="fill:#ffffff" /> + - + style="fill:#ffffff" /> + + -