diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 8caabdaeb17..26afad5f92e 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -692,8 +692,12 @@ Ref create_editor_theme(const Ref 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); diff --git a/editor/icons/icon_GUI_checked_disabled.svg b/editor/icons/icon_GUI_checked_disabled.svg new file mode 100644 index 00000000000..6252176241f --- /dev/null +++ b/editor/icons/icon_GUI_checked_disabled.svg @@ -0,0 +1 @@ + diff --git a/editor/icons/icon_GUI_radio_checked_disabled.svg b/editor/icons/icon_GUI_radio_checked_disabled.svg new file mode 100644 index 00000000000..94a1fffa0b6 --- /dev/null +++ b/editor/icons/icon_GUI_radio_checked_disabled.svg @@ -0,0 +1 @@ + diff --git a/editor/icons/icon_GUI_radio_unchecked_disabled.svg b/editor/icons/icon_GUI_radio_unchecked_disabled.svg new file mode 100644 index 00000000000..3a75797c4db --- /dev/null +++ b/editor/icons/icon_GUI_radio_unchecked_disabled.svg @@ -0,0 +1 @@ + diff --git a/editor/icons/icon_GUI_toggle_off_disabled.svg b/editor/icons/icon_GUI_toggle_off_disabled.svg new file mode 100644 index 00000000000..020ebdc3a8b --- /dev/null +++ b/editor/icons/icon_GUI_toggle_off_disabled.svg @@ -0,0 +1 @@ + diff --git a/editor/icons/icon_GUI_toggle_on_disabled.svg b/editor/icons/icon_GUI_toggle_on_disabled.svg new file mode 100644 index 00000000000..df6b27c71e0 --- /dev/null +++ b/editor/icons/icon_GUI_toggle_on_disabled.svg @@ -0,0 +1 @@ + diff --git a/editor/icons/icon_GUI_unchecked_disabled.svg b/editor/icons/icon_GUI_unchecked_disabled.svg new file mode 100644 index 00000000000..2b6515f9d79 --- /dev/null +++ b/editor/icons/icon_GUI_unchecked_disabled.svg @@ -0,0 +1 @@ + diff --git a/scene/gui/check_box.cpp b/scene/gui/check_box.cpp index 8deee8c5511..c9634497471 100644 --- a/scene/gui/check_box.cpp +++ b/scene/gui/check_box.cpp @@ -39,6 +39,8 @@ Size2 CheckBox::get_icon_size() const { Ref unchecked_disabled = Control::get_icon("unchecked_disabled"); Ref radio_checked = Control::get_icon("radio_checked"); Ref radio_unchecked = Control::get_icon("radio_unchecked"); + Ref radio_checked_disabled = Control::get_icon("radio_checked_disabled"); + Ref 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; }