summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2022-03-11 21:56:47 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-08-18 22:17:55 +0200
commitce8b402f3a461d253dd5720f4ad3d4df5beef87b (patch)
treee1c77bb9c5f66ed14480a1e04ca6fac7ba289f85
parentd6090174b3a18c6834369bf966f4efc57bf7ff4b (diff)
Don't use rounded corners for PopupMenus in the editor theme
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).
-rw-r--r--editor/editor_themes.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index c58d1263f3..b65b0fd8be 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -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();