Просмотр исходного кода

Get the opacity of the extruder from the theme

CURA-8011
Konstantinos Karmas 3 лет назад
Родитель
Сommit
0319fdcc41

+ 1 - 1
resources/qml/ExtruderIcon.qml

@@ -21,7 +21,7 @@ Item
 
     Item
     {
-        opacity: extruderEnabled ? 1 : 0.4
+        opacity: extruderEnabled ? 1 : UM.Theme.getColor("extruder_disabled").a
         anchors.fill: parent
 
         UM.RecolorImage

+ 1 - 1
resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml

@@ -62,7 +62,7 @@ Cura.ExpandablePopup
                     Item
                     {
                         height: childrenRect.height
-                        opacity: model.enabled ? 1 : 0.4
+                        opacity: model.enabled ? 1 : UM.Theme.getColor("extruder_disabled").a
                         anchors
                         {
                             left: extruderIcon.right

+ 1 - 0
resources/themes/cura-light/theme.json

@@ -270,6 +270,7 @@
         "button_tooltip_text": [192, 193, 194, 255],
 
         "extruder_button_material_border": [255, 255, 255, 255],
+        "extruder_disabled": [255, 255, 255, 102],
 
         "rating_star": [90, 90, 90, 255],