Add missing CheckBox & CheckButton editor icons
Co-authored-by: Silc 'Tokage' Renew <tokage.it.lab@gmail.com> Co-authored-by: Yuri Sizov <yuris@humnom.net>
This commit is contained in:
parent
a5f9e1ce18
commit
1136a9b58a
8 changed files with 24 additions and 0 deletions
|
@ -692,8 +692,12 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
|
|||
theme->set_stylebox("hover", "CheckBox", sb_checkbox);
|
||||
theme->set_icon("checked", "CheckBox", theme->get_icon("GuiChecked", "EditorIcons"));
|
||||
theme->set_icon("unchecked", "CheckBox", theme->get_icon("GuiUnchecked", "EditorIcons"));
|
||||
theme->set_icon("checked_disabled", "CheckBox", theme->get_icon("GuiCheckedDisabled", "EditorIcons"));
|
||||
theme->set_icon("unchecked_disabled", "CheckBox", theme->get_icon("GuiUncheckedDisabled", "EditorIcons"));
|
||||
theme->set_icon("radio_checked", "CheckBox", theme->get_icon("GuiRadioChecked", "EditorIcons"));
|
||||
theme->set_icon("radio_unchecked", "CheckBox", theme->get_icon("GuiRadioUnchecked", "EditorIcons"));
|
||||
theme->set_icon("radio_checked_disabled", "CheckBox", theme->get_icon("GuiRadioCheckedDisabled", "EditorIcons"));
|
||||
theme->set_icon("radio_unchecked_disabled", "CheckBox", theme->get_icon("GuiRadioUncheckedDisabled", "EditorIcons"));
|
||||
|
||||
theme->set_color("font_color", "CheckBox", font_color);
|
||||
theme->set_color("font_color_hover", "CheckBox", font_color_hl);
|
||||
|
|
1
editor/icons/icon_GUI_checked_disabled.svg
Normal file
1
editor/icons/icon_GUI_checked_disabled.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.333 1c-1.289 0-2.333 1.045-2.333 2.333v9.333c0 1.289 1.044 2.334 2.333 2.334h9.333c1.289 0 2.334-1.045 2.334-2.334v-9.333c0-1.289-1.045-2.333-2.334-2.333z" fill="#808080"/><path d="m11.501 3.734-5.612 5.612-1.704-1.681-1.5 1.5 3.204 3.181 7.111-7.113z" fill="#b3b3b3"/></svg>
|
After Width: | Height: | Size: 405 B |
1
editor/icons/icon_GUI_radio_checked_disabled.svg
Normal file
1
editor/icons/icon_GUI_radio_checked_disabled.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 8c0 3.866-3.134 7-7 7s-7-3.134-7-7 3.134-7 7-7 7 3.134 7 7" fill="#808080"/><path d="m12 8c0 2.209-1.791 4-4 4s-4-1.791-4-4 1.791-4 4-4 4 1.791 4 4" fill="#b3b3b3"/></svg>
|
After Width: | Height: | Size: 302 B |
1
editor/icons/icon_GUI_radio_unchecked_disabled.svg
Normal file
1
editor/icons/icon_GUI_radio_unchecked_disabled.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 8c0 3.866-3.134 7-7 7s-7-3.134-7-7 3.134-7 7-7 7 3.134 7 7" fill="#808080" fill-opacity=".1882"/></svg>
|
After Width: | Height: | Size: 234 B |
1
editor/icons/icon_GUI_toggle_off_disabled.svg
Normal file
1
editor/icons/icon_GUI_toggle_off_disabled.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg height="16" viewBox="0 0 38 15.999999" width="38" xmlns="http://www.w3.org/2000/svg"><g fill="#808080"><rect fill-opacity=".188235" height="14" rx="7" stroke-width="55.8958" width="36" x="1" y="1"/><circle cx="8" cy="8" r="5" stroke-width="97.3613"/></g></svg>
|
After Width: | Height: | Size: 266 B |
1
editor/icons/icon_GUI_toggle_on_disabled.svg
Normal file
1
editor/icons/icon_GUI_toggle_on_disabled.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg height="16" viewBox="0 0 38 15.999999" width="38" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-4 0-7 3.0000002-7 7.0000002 0 3.9999998 3 6.9999998 7 6.9999998h22c4 0 7-3 7-6.9999998 0-4-3-7.0000002-7-7.0000002-7.333334 0-14.55609 0-22 0z" fill="#808080"/><circle cx="30" cy="8" fill="#b3b3b3" r="5"/></svg>
|
After Width: | Height: | Size: 317 B |
1
editor/icons/icon_GUI_unchecked_disabled.svg
Normal file
1
editor/icons/icon_GUI_unchecked_disabled.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.333 1c-1.289 0-2.333 1.045-2.333 2.333v9.333c0 1.289 1.044 2.334 2.333 2.334h9.333c1.289 0 2.334-1.045 2.334-2.334v-9.333c0-1.289-1.045-2.333-2.334-2.333z" fill="#808080" fill-opacity=".1882"/></svg>
|
After Width: | Height: | Size: 329 B |
|
@ -39,6 +39,8 @@ Size2 CheckBox::get_icon_size() const {
|
|||
Ref<Texture> unchecked_disabled = Control::get_icon("unchecked_disabled");
|
||||
Ref<Texture> radio_checked = Control::get_icon("radio_checked");
|
||||
Ref<Texture> radio_unchecked = Control::get_icon("radio_unchecked");
|
||||
Ref<Texture> radio_checked_disabled = Control::get_icon("radio_checked_disabled");
|
||||
Ref<Texture> radio_unchecked_disabled = Control::get_icon("radio_unchecked_disabled");
|
||||
|
||||
Size2 tex_size = Size2(0, 0);
|
||||
if (!checked.is_null()) {
|
||||
|
@ -53,6 +55,18 @@ Size2 CheckBox::get_icon_size() const {
|
|||
if (!radio_unchecked.is_null()) {
|
||||
tex_size = Size2(MAX(tex_size.width, radio_unchecked->get_width()), MAX(tex_size.height, radio_unchecked->get_height()));
|
||||
}
|
||||
if (!checked_disabled.is_null()) {
|
||||
tex_size = Size2(MAX(tex_size.width, checked_disabled->get_width()), MAX(tex_size.height, checked_disabled->get_height()));
|
||||
}
|
||||
if (!unchecked_disabled.is_null()) {
|
||||
tex_size = Size2(MAX(tex_size.width, unchecked_disabled->get_width()), MAX(tex_size.height, unchecked_disabled->get_height()));
|
||||
}
|
||||
if (!radio_checked_disabled.is_null()) {
|
||||
tex_size = Size2(MAX(tex_size.width, radio_checked_disabled->get_width()), MAX(tex_size.height, radio_checked_disabled->get_height()));
|
||||
}
|
||||
if (!radio_unchecked_disabled.is_null()) {
|
||||
tex_size = Size2(MAX(tex_size.width, radio_unchecked_disabled->get_width()), MAX(tex_size.height, radio_unchecked_disabled->get_height()));
|
||||
}
|
||||
return tex_size;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue