GUI: View checked inactive checkbox as grey, not invisible

This commit is contained in:
lolbot-iichan 2020-04-01 01:55:01 +03:00 committed by Eugene Sandulenko
parent 4a0cec37b6
commit 73f1da2773
7 changed files with 49 additions and 4 deletions

View File

@ -141,9 +141,10 @@ static const DrawDataInfo kDrawDataDefaults[] = {
{kDDSliderHover, "slider_hover", kDrawLayerForeground, kDDNone},
{kDDSliderDisabled, "slider_disabled", kDrawLayerForeground, kDDNone},
{kDDCheckboxDefault, "checkbox_default", kDrawLayerBackground, kDDNone},
{kDDCheckboxDisabled, "checkbox_disabled", kDrawLayerBackground, kDDNone},
{kDDCheckboxSelected, "checkbox_selected", kDrawLayerForeground, kDDCheckboxDefault},
{kDDCheckboxDefault, "checkbox_default", kDrawLayerBackground, kDDNone},
{kDDCheckboxDisabled, "checkbox_disabled", kDrawLayerBackground, kDDNone},
{kDDCheckboxSelected, "checkbox_selected", kDrawLayerForeground, kDDCheckboxDefault},
{kDDCheckboxDisabledSelected, "checkbox_disabled_selected", kDrawLayerForeground, kDDCheckboxDisabled},
{kDDRadiobuttonDefault, "radiobutton_default", kDrawLayerBackground, kDDNone},
{kDDRadiobuttonDisabled, "radiobutton_disabled", kDrawLayerBackground, kDDNone},
@ -994,7 +995,7 @@ void ThemeEngine::drawCheckbox(const Common::Rect &r, const Common::String &str,
dd = kDDCheckboxSelected;
if (state == kStateDisabled)
dd = kDDCheckboxDisabled;
dd = checked ? kDDCheckboxDisabledSelected : kDDCheckboxDisabled;
const int checkBoxSize = MIN((int)r.height(), getFontHeight());

View File

@ -94,6 +94,7 @@ enum DrawData {
kDDCheckboxDefault,
kDDCheckboxDisabled,
kDDCheckboxSelected,
kDDCheckboxDisabledSelected,
kDDRadiobuttonDefault,
kDDRadiobuttonDisabled,

View File

@ -898,6 +898,23 @@
/>
</drawdata>
<drawdata id = 'checkbox_disabled_selected' cache = 'false'>
<text font = 'text_default'
text_color = 'color_normal_disabled'
vertical_align = 'top'
horizontal_align = 'left'
/>
<drawstep func = 'bevelsq'
bevel = '2'
fill = 'none'
/>
<drawstep func = 'cross'
fill = 'foreground'
stroke = '2'
fg_color = 'lightgrey'
/>
</drawdata>
<drawdata id = 'checkbox_disabled' cache = 'false'>
<text font = 'text_default'
text_color = 'color_normal_disabled'

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

View File

@ -106,6 +106,7 @@
<bitmap filename = 'cursor_small.bmp'/>
<bitmap filename = 'checkbox.bmp'/>
<bitmap filename = 'checkbox_empty.bmp'/>
<bitmap filename = 'checkbox_disabled.bmp'/>
<bitmap filename = 'radiobutton.bmp'/>
<bitmap filename = 'radiobutton_empty.bmp'/>
<bitmap filename = 'logo_small.bmp'/>
@ -1214,6 +1215,18 @@
/>
</drawdata>
<!-- Disabled selected checkbox -->
<drawdata id = 'checkbox_disabled_selected' cache = 'false'>
<text font = 'text_default'
text_color = 'color_normal_disabled'
vertical_align = 'top'
horizontal_align = 'left'
/>
<drawstep func = 'bitmap'
file = 'checkbox_disabled.bmp'
/>
</drawdata>
<!-- Disabled checkbox -->
<drawdata id = 'checkbox_disabled' cache = 'false'>
<text font = 'text_default'

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

View File

@ -107,6 +107,7 @@
<bitmap filename = 'cursor_small.bmp'/>
<bitmap filename = 'checkbox.bmp'/>
<bitmap filename = 'checkbox_empty.bmp'/>
<bitmap filename = 'checkbox_disabled.bmp'/>
<bitmap filename = 'radiobutton.bmp'/>
<bitmap filename = 'radiobutton_empty.bmp'/>
<bitmap filename = 'logo_small.bmp'/>
@ -1136,6 +1137,18 @@
/>
</drawdata>
<!-- Disabled selected checkbox -->
<drawdata id = 'checkbox_disabled_selected' cache = 'false'>
<text font = 'text_default'
text_color = 'color_normal_disabled'
vertical_align = 'top'
horizontal_align = 'left'
/>
<drawstep func = 'bitmap'
file = 'checkbox_disabled.bmp'
/>
</drawdata>
<!-- Disabled checkbox -->
<drawdata id = 'checkbox_disabled' cache = 'false'>
<text font = 'text_default'