1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 03:47:34 +00:00

WindowServer: Let WindowManager set serverside effects

Menu and Window animations can now be disabled and the geometry
overlay made conditional. Shadow options are dependent on the
current theme actually supplying bitmaps, but they provide a fast
way to toggle those that do without having to edit theme files.
This commit is contained in:
thankyouverycool 2022-08-07 20:14:01 -04:00 committed by Andreas Kling
parent 5917545633
commit d11ce1d808
4 changed files with 26 additions and 7 deletions

View file

@ -199,8 +199,12 @@ MultiScaleBitmaps const* WindowFrame::shadow_bitmap() const
case WindowType::Desktop:
return nullptr;
case WindowType::Menu:
if (!WindowManager::the().system_effects().menu_shadow())
return nullptr;
return s_menu_shadow;
case WindowType::Tooltip:
if (!WindowManager::the().system_effects().tooltip_shadow())
return nullptr;
return s_tooltip_shadow;
case WindowType::Taskbar:
return s_taskbar_shadow;
@ -209,6 +213,8 @@ MultiScaleBitmaps const* WindowFrame::shadow_bitmap() const
case WindowType::WindowSwitcher:
return nullptr;
default:
if (!WindowManager::the().system_effects().window_shadow())
return nullptr;
// FIXME: Support shadow for themes with border radius
if (WindowManager::the().palette().window_border_radius() > 0)
return nullptr;