Skip to content

Commit

Permalink
Merge pull request #63877 from YeldhamDev/check_theme_fix
Browse files Browse the repository at this point in the history
Fix text position when hovering pressed `CheckButton/Box` elements in the editor
  • Loading branch information
akien-mga authored Aug 3, 2022
2 parents 259d778 + 1bd9efa commit ea4b8de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editor/editor_themes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("pressed", "CheckButton", style_menu);
theme->set_stylebox("disabled", "CheckButton", style_menu);
theme->set_stylebox("hover", "CheckButton", style_menu);
theme->set_stylebox("hover_pressed", "CheckButton", style_menu);

theme->set_icon("on", "CheckButton", theme->get_icon(SNAME("GuiToggleOn"), SNAME("EditorIcons")));
theme->set_icon("on_disabled", "CheckButton", theme->get_icon(SNAME("GuiToggleOnDisabled"), SNAME("EditorIcons")));
Expand Down Expand Up @@ -871,6 +872,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("pressed", "CheckBox", sb_checkbox);
theme->set_stylebox("disabled", "CheckBox", sb_checkbox);
theme->set_stylebox("hover", "CheckBox", sb_checkbox);
theme->set_stylebox("hover_pressed", "CheckBox", sb_checkbox);
theme->set_icon("checked", "CheckBox", theme->get_icon(SNAME("GuiChecked"), SNAME("EditorIcons")));
theme->set_icon("unchecked", "CheckBox", theme->get_icon(SNAME("GuiUnchecked"), SNAME("EditorIcons")));
theme->set_icon("radio_checked", "CheckBox", theme->get_icon(SNAME("GuiRadioChecked"), SNAME("EditorIcons")));
Expand Down

0 comments on commit ea4b8de

Please sign in to comment.