Browse Source

Give checkboxes a style if they're disabled

Contributes to issue CURA-5876.
Ghostkeeper 6 years ago
parent
commit
f4950cf92b
2 changed files with 2 additions and 1 deletions
  1. 1 1
      resources/themes/cura-light/styles.qml
  2. 1 0
      resources/themes/cura-light/theme.json

+ 1 - 1
resources/themes/cura-light/styles.qml

@@ -646,7 +646,7 @@ QtObject
                 implicitWidth:  Theme.getSize("checkbox").width
                 implicitHeight: Theme.getSize("checkbox").height
 
-                color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_hover") : Theme.getColor("checkbox")
+                color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_hover") : (control.enabled ? Theme.getColor("checkbox") : Theme.getColor("checkbox_disabled"))
                 Behavior on color { ColorAnimation { duration: 50; } }
 
                 radius: control.exclusiveGroup ? Math.round(Theme.getSize("checkbox").width / 2) : 0

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

@@ -235,6 +235,7 @@
         "checkbox_border": [64, 69, 72, 255],
         "checkbox_border_hover": [50, 130, 255, 255],
         "checkbox_mark": [119, 122, 124, 255],
+        "checkbox_disabled": [223, 223, 223, 255],
         "checkbox_text": [27, 27, 27, 255],
 
         "tooltip": [68, 192, 255, 255],