From 9735daf4974d2ddc22ba9df752fa817751848852 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 29 Jun 2021 16:21:39 +0200 Subject: [PATCH] Replace the extruder icon with the new design CURA-8011 --- resources/qml/ExtruderIcon.qml | 51 +++++++------------ .../cura-light/icons/medium/ExtruderColor.svg | 11 ++++ 2 files changed, 29 insertions(+), 33 deletions(-) create mode 100644 resources/themes/cura-light/icons/medium/ExtruderColor.svg diff --git a/resources/qml/ExtruderIcon.qml b/resources/qml/ExtruderIcon.qml index 1c93966519..2d21ed9e13 100644 --- a/resources/qml/ExtruderIcon.qml +++ b/resources/qml/ExtruderIcon.qml @@ -1,7 +1,7 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2021 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. -import QtQuick 2.7 +import QtQuick 2.11 import QtQuick.Controls 1.1 import UM 1.2 as UM @@ -17,29 +17,26 @@ Item property alias textColor: extruderNumberText.color property bool extruderEnabled: true - UM.RecolorImage + Item { - id: mainIcon + opacity: extruderEnabled ? 1 : 0.4 anchors.fill: parent - source: UM.Theme.getIcon("Extruder", "medium") - color: extruderEnabled ? materialColor: UM.Theme.getColor("disabled") - } - - Rectangle - { - id: extruderNumberCircle - - width: height - height: Math.round(parent.height / 2) - radius: Math.round(width) - color: UM.Theme.getColor("toolbar_background") - - anchors + UM.RecolorImage { - horizontalCenter: parent.horizontalCenter - top: parent.top - topMargin: (parent.height - height) / 2 + id: blorp + anchors.fill: parent + + source: UM.Theme.getIcon("ExtruderColor", "medium") + color: materialColor + } + UM.RecolorImage + { + id: mainIcon + anchors.fill: parent + + source: UM.Theme.getIcon("Extruder", "medium") + color: UM.Theme.getColor("text") } Label @@ -51,21 +48,9 @@ Item color: UM.Theme.getColor("text") width: contentWidth height: contentHeight - visible: extruderEnabled renderType: Text.NativeRendering horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } - - UM.RecolorImage - { - id: disabledIcon - anchors.fill: parent - anchors.margins: UM.Theme.getSize("thick_lining").width - sourceSize.height: width - source: UM.Theme.getIcon("Cancel") - visible: !extruderEnabled - color: UM.Theme.getColor("text") - } } } diff --git a/resources/themes/cura-light/icons/medium/ExtruderColor.svg b/resources/themes/cura-light/icons/medium/ExtruderColor.svg new file mode 100644 index 0000000000..c017c69106 --- /dev/null +++ b/resources/themes/cura-light/icons/medium/ExtruderColor.svg @@ -0,0 +1,11 @@ + + + + + + + + +