Merge pull request #59045 from Calinou/editor-theme-popup-no-rounded-corners

Don't use rounded corners for PopupMenus in the editor theme
This commit is contained in:
Yuri Sizov 2022-08-19 02:42:17 +03:00 committed by GitHub
commit 0d95b8bff2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -931,6 +931,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. // 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_width_all(EDSCALE);
style_popup_menu->set_border_color(dark_color_2); 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); theme->set_stylebox("panel", "PopupMenu", style_popup_menu);
Ref<StyleBoxFlat> style_menu_hover = style_widget_hover->duplicate(); Ref<StyleBoxFlat> style_menu_hover = style_widget_hover->duplicate();