Fix extruderIcon sizing

CURA-9278
This commit is contained in:
Joey de l'Arago 2022-09-05 15:32:05 +02:00
parent a56a21cf93
commit d3ee9c4c24

View File

@ -8,16 +8,16 @@ Item
{ {
id: extruderIconItem id: extruderIconItem
implicitWidth: UM.Theme.getSize("extruder_icon").width
implicitHeight: UM.Theme.getSize("extruder_icon").height
property bool checked: true property bool checked: true
property color materialColor property color materialColor
property alias textColor: extruderNumberText.color property alias textColor: extruderNumberText.color
property bool extruderEnabled: true property bool extruderEnabled: true
property var iconSize property var iconSize: UM.Theme.getSize("extruder_icon").width
property string iconVariant: "medium" property string iconVariant: "medium"
implicitWidth: iconSize
implicitHeight: iconSize
Item Item
{ {
opacity: extruderEnabled ? 1 : UM.Theme.getColor("extruder_disabled").a opacity: extruderEnabled ? 1 : UM.Theme.getColor("extruder_disabled").a
@ -27,8 +27,8 @@ Item
UM.ColorImage UM.ColorImage
{ {
anchors.fill: parent anchors.fill: parent
width: mainIcon.width width: iconSize
height: mainIcon.height height: iconSize
source: UM.Theme.getIcon("ExtruderColor", iconVariant) source: UM.Theme.getIcon("ExtruderColor", iconVariant)
color: materialColor color: materialColor
@ -37,8 +37,8 @@ Item
{ {
id: mainIcon id: mainIcon
anchors.fill: parent anchors.fill: parent
width: UM.Theme.getSize("extruder_icon").width width: iconSize
height: UM.Theme.getSize("extruder_icon").height height: iconSize
source: UM.Theme.getIcon("Extruder", iconVariant) source: UM.Theme.getIcon("Extruder", iconVariant)
color: extruderNumberText.color color: extruderNumberText.color