Skip to content

Commit

Permalink
EditorTheme: Remove rounded corners for all popups
Browse files Browse the repository at this point in the history
Expands godotengine#59045 to apply to all kinds of popups,
since they all render as separate windows.
  • Loading branch information
RedMser committed Sep 2, 2022
1 parent 6ccbc27 commit 7664ea8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions editor/editor_themes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color shadow_color = Color(0, 0, 0, dark_theme ? 0.3 : 0.1);
style_popup->set_shadow_color(shadow_color);
style_popup->set_shadow_size(4 * EDSCALE);
// 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->set_corner_radius_all(0);

Ref<StyleBoxLine> style_popup_separator(memnew(StyleBoxLine));
style_popup_separator->set_color(separator_color);
Expand Down Expand Up @@ -975,9 +978,6 @@ 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 7664ea8

Please sign in to comment.