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

LibGfx+WindowServer: Simplify WindowTheme::paint_normal_frame() API

Don't require passing in the outer frame rect since the theme can
compute that itself, based on the window rect.
This commit is contained in:
Andreas Kling 2020-08-21 19:35:34 +02:00
parent 116c0c0ab3
commit 80a9896e83
4 changed files with 7 additions and 6 deletions

View file

@ -67,9 +67,11 @@ Gfx::IntRect ClassicWindowTheme::title_bar_text_rect(WindowType window_type, con
};
}
void ClassicWindowTheme::paint_normal_frame(Painter& painter, WindowState window_state, const IntRect& outer_rect, const IntRect& window_rect, const StringView& title_text, const Bitmap& icon, const Palette& palette, const IntRect& leftmost_button_rect) const
void ClassicWindowTheme::paint_normal_frame(Painter& painter, WindowState window_state, const IntRect& window_rect, const StringView& title_text, const Bitmap& icon, const Palette& palette, const IntRect& leftmost_button_rect) const
{
Gfx::StylePainter::paint_window_frame(painter, outer_rect, palette);
auto frame_rect = frame_rect_for_window(WindowType::Normal, window_rect, palette);
frame_rect.set_location({ 0, 0 });
Gfx::StylePainter::paint_window_frame(painter, frame_rect, palette);
auto& title_font = Font::default_bold_font();