Skip to content

Commit

Permalink
Merge pull request #58759 from raulsntos/icon_color-editor-theme
Browse files Browse the repository at this point in the history
Add `icon_normal_color` to Button in editor theme
  • Loading branch information
akien-mga authored Mar 4, 2022
2 parents c787f59 + 0d7b466 commit 38771eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion editor/editor_themes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color disabled_color = mono_color.inverted().lerp(base_color, 0.7);
const Color disabled_bg_color = mono_color.inverted().lerp(base_color, 0.9);

Color icon_hover_color = Color(1, 1, 1) * (dark_theme ? 1.15 : 1.45);
const Color icon_normal_color = Color(1, 1, 1);
Color icon_hover_color = icon_normal_color * (dark_theme ? 1.15 : 1.45);
icon_hover_color.a = 1.0;
Color icon_focus_color = icon_hover_color;
// Make the pressed icon color overbright because icons are not completely white on a dark theme.
Expand Down Expand Up @@ -688,6 +689,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("font_focus_color", "Button", font_focus_color);
theme->set_color("font_pressed_color", "Button", accent_color);
theme->set_color("font_disabled_color", "Button", font_disabled_color);
theme->set_color("icon_normal_color", "Button", icon_normal_color);
theme->set_color("icon_hover_color", "Button", icon_hover_color);
theme->set_color("icon_focus_color", "Button", icon_focus_color);
theme->set_color("icon_pressed_color", "Button", icon_pressed_color);
Expand Down

0 comments on commit 38771eb

Please sign in to comment.