Replace the extruder icon with the new design

CURA-8011
This commit is contained in:
Jaime van Kessel 2021-06-29 16:21:39 +02:00
parent 778172a07a
commit 9735daf497
No known key found for this signature in database
GPG key ID: 3710727397403C91
2 changed files with 29 additions and 33 deletions

View file

@ -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")
}
}
}

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
<g id="Layer_1">
<path style="fill:#231F20;" d="M15,25C9.486,25,5,20.514,5,15S9.486,5,15,5s10,4.486,10,10S20.514,25,15,25z M15,7
c-4.411,0-8,3.589-8,8s3.589,8,8,8s8-3.589,8-8S19.411,7,15,7z"/>
</g>
<g id="Comments">
</g>
</svg>

After

Width:  |  Height:  |  Size: 568 B