Move layer.enabled inside the child item in ExtruderIcon

When it was in the outer item, it was causing the label to disappear when then extruder icon was getting disabled. Moving it inside the child item which has the opacity change seems to fix that issue.

CURA-8417
This commit is contained in:
Konstantinos Karmas 2021-08-05 09:52:03 +02:00
parent b86e6ddfe6
commit c3f26d4daa

View File

@ -18,11 +18,12 @@ Item
property bool extruderEnabled: true property bool extruderEnabled: true
property alias iconSize: mainIcon.sourceSize property alias iconSize: mainIcon.sourceSize
property string iconVariant: "medium" property string iconVariant: "medium"
layer.enabled: true // Prevent weird opacity effects.
Item Item
{ {
opacity: extruderEnabled ? 1 : UM.Theme.getColor("extruder_disabled").a opacity: extruderEnabled ? 1 : UM.Theme.getColor("extruder_disabled").a
anchors.fill: parent anchors.fill: parent
layer.enabled: true // Prevent weird opacity effects.
UM.RecolorImage UM.RecolorImage
{ {