Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use disabled icons for CheckBox in DefaultTheme #84946

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions scene/gui/popup_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,9 +737,7 @@ void PopupMenu::_draw_items() {
}
}

Color icon_color(1, 1, 1, items[i].disabled && !items[i].separator ? 0.5 : 1);

icon_color *= items[i].icon_modulate;
Color icon_color = items[i].icon_modulate;

// For non-separator items, add some padding for the content.
if (!items[i].separator) {
Expand Down
16 changes: 8 additions & 8 deletions scene/theme/default_theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,13 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_stylebox("focus", "CheckBox", cbx_focus);

theme->set_icon("checked", "CheckBox", icons["checked"]);
theme->set_icon("checked_disabled", "CheckBox", icons["checked"]);
theme->set_icon("checked_disabled", "CheckBox", icons["checked_disabled"]);
theme->set_icon("unchecked", "CheckBox", icons["unchecked"]);
theme->set_icon("unchecked_disabled", "CheckBox", icons["unchecked"]);
theme->set_icon("unchecked_disabled", "CheckBox", icons["unchecked_disabled"]);
theme->set_icon("radio_checked", "CheckBox", icons["radio_checked"]);
theme->set_icon("radio_checked_disabled", "CheckBox", icons["radio_checked"]);
theme->set_icon("radio_checked_disabled", "CheckBox", icons["radio_checked_disabled"]);
theme->set_icon("radio_unchecked", "CheckBox", icons["radio_unchecked"]);
theme->set_icon("radio_unchecked_disabled", "CheckBox", icons["radio_unchecked"]);
theme->set_icon("radio_unchecked_disabled", "CheckBox", icons["radio_unchecked_disabled"]);

theme->set_font("font", "CheckBox", Ref<Font>());
theme->set_font_size("font_size", "CheckBox", -1);
Expand Down Expand Up @@ -685,13 +685,13 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_stylebox("labeled_separator_right", "PopupMenu", separator_horizontal);

theme->set_icon("checked", "PopupMenu", icons["checked"]);
theme->set_icon("checked_disabled", "PopupMenu", icons["checked"]);
theme->set_icon("checked_disabled", "PopupMenu", icons["checked_disabled"]);
theme->set_icon("unchecked", "PopupMenu", icons["unchecked"]);
theme->set_icon("unchecked_disabled", "PopupMenu", icons["unchecked"]);
theme->set_icon("unchecked_disabled", "PopupMenu", icons["unchecked_disabled"]);
theme->set_icon("radio_checked", "PopupMenu", icons["radio_checked"]);
theme->set_icon("radio_checked_disabled", "PopupMenu", icons["radio_checked"]);
theme->set_icon("radio_checked_disabled", "PopupMenu", icons["radio_checked_disabled"]);
theme->set_icon("radio_unchecked", "PopupMenu", icons["radio_unchecked"]);
theme->set_icon("radio_unchecked_disabled", "PopupMenu", icons["radio_unchecked"]);
theme->set_icon("radio_unchecked_disabled", "PopupMenu", icons["radio_unchecked_disabled"]);
theme->set_icon("submenu", "PopupMenu", icons["popup_menu_arrow_right"]);
theme->set_icon("submenu_mirrored", "PopupMenu", icons["popup_menu_arrow_left"]);

Expand Down
Loading