Fix checkboxes not showing check marks when disabled.

Update checkboxes to align with new designs.

Update SettingCheckBox to match checkbox styling.

Remove duplicated styling inside cura-dark/theme.json

CURA-8991
This commit is contained in:
j.delarago 2022-03-04 11:28:11 +01:00
parent 2ed68beb22
commit a26b54f6e2
3 changed files with 14 additions and 20 deletions

View File

@ -11,7 +11,7 @@ SettingItem
{
id: base
property var focusItem: control
enabled: false
contents: MouseArea
{
id: control
@ -98,7 +98,7 @@ SettingItem
{
if(!enabled)
{
return UM.Theme.getColor("checkbox_border")
return UM.Theme.getColor("checkbox_border_disabled")
}
switch (propertyProvider.properties.validationState)
{
@ -116,7 +116,7 @@ SettingItem
{
return UM.Theme.getColor("checkbox_border_hover")
}
return UM.Theme.getColor("setting_control_border")
return UM.Theme.getColor("checkbox_border")
}
color: {
@ -138,7 +138,7 @@ SettingItem
// Validation is OK.
if (control.containsMouse || control.activeFocus)
{
return UM.Theme.getColor("setting_control_highlight")
return UM.Theme.getColor("checkbox_hover")
}
return UM.Theme.getColor("checkbox")
}
@ -150,7 +150,7 @@ SettingItem
height: UM.Theme.getSize("checkbox_mark").height
width: UM.Theme.getSize("checkbox_mark").width
sourceSize.height: width
color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text");
color: !enabled ? UM.Theme.getColor("checkbox_mark_disabled") : UM.Theme.getColor("checkbox_mark");
source: UM.Theme.getIcon("Check", "low")
opacity: control.checked ? 1 : 0
Behavior on opacity { NumberAnimation { duration: 100; } }

View File

@ -155,15 +155,6 @@
"slider_handle": [255, 255, 255, 255],
"slider_handle_active": [68, 192, 255, 255],
"checkbox": "background_1",
"checkbox_hover": [43, 48, 52, 255],
"checkbox_border": "text_disabled",
"checkbox_border_hover": "border_main",
"checkbox_mark": "text_default",
"checkbox_square": "text_disabled",
"checkbox_text": "text_default",
"checkbox_disabled": "background_2",
"category_background": "background_3",
"tooltip": "background_2",

View File

@ -324,13 +324,16 @@
"quality_slider_unavailable": [179, 179, 179, 255],
"quality_slider_available": [0, 0, 0, 255],
"checkbox": [255, 255, 255, 255],
"checkbox_hover": "border_main",
"checkbox_border": [180, 180, 180, 255],
"checkbox_border_hover": [25, 110, 240, 255],
"checkbox_mark": [35, 35, 35, 255],
"checkbox": "background_1",
"checkbox_hover": "background_1",
"checkbox_disabled": "background_2",
"checkbox_text": [0, 12, 26, 255],
"checkbox_border": [180, 180, 180, 255],
"checkbox_border_hover": "border_main",
"checkbox_border_disabled": "text_disabled",
"checkbox_mark": "text_default",
"checkbox_mark_disabled": "text_disabled",
"checkbox_text": "text_default",
"checkbox_text_disabled": "text_disabled",
"category_background": "background_2",