1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:28:11 +00:00

LibGfx+WindowServer: Simplify notification window frame theming

Don't require theme clients to provide the frame rect, the theme can
compute that internally based on the window rect.
This commit is contained in:
Andreas Kling 2020-08-23 13:17:34 +02:00
parent 0944f56181
commit 85e818206c
4 changed files with 7 additions and 6 deletions

View file

@ -172,8 +172,7 @@ Gfx::WindowTheme::WindowState WindowFrame::window_state_for_theme() const
void WindowFrame::paint_notification_frame(Gfx::Painter& painter)
{
auto palette = WindowManager::the().palette();
Gfx::IntRect outer_rect = { {}, rect().size() };
Gfx::WindowTheme::current().paint_notification_frame(painter, outer_rect, m_window.rect(), palette, m_buttons.last().relative_rect());
Gfx::WindowTheme::current().paint_notification_frame(painter, m_window.rect(), palette, m_buttons.last().relative_rect());
}
void WindowFrame::paint_normal_frame(Gfx::Painter& painter)