Skip to content

Commit

Permalink
Don't use rounded corners for PopupMenus in the editor theme
Browse files Browse the repository at this point in the history
PopupMenus use separate windows by default in the editor, and windows
no longer support per-pixel transparency for now in 4.0.
Even if per-pixel transparency was reimplemented, we can't assume
that it'll always work in practice (e.g. when compositing is disabled).
  • Loading branch information
Calinou committed Aug 18, 2022
1 parent d609017 commit ce8b402
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions editor/editor_themes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// Always display a border for PopupMenus so they can be distinguished from their background.
style_popup_menu->set_border_width_all(EDSCALE);
style_popup_menu->set_border_color(dark_color_2);
// Popups are separate windows by default in the editor. Windows currently don't support per-pixel transparency
// in 4.0, and even if it was, it may not always work in practice (e.g. running with compositing disabled).
style_popup_menu->set_corner_radius_all(0);
theme->set_stylebox("panel", "PopupMenu", style_popup_menu);

Ref<StyleBoxFlat> style_menu_hover = style_widget_hover->duplicate();
Expand Down

0 comments on commit ce8b402

Please sign in to comment.