mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 19:15:06 +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:
parent
116c0c0ab3
commit
80a9896e83
4 changed files with 7 additions and 6 deletions
|
@ -180,7 +180,6 @@ void WindowFrame::paint_normal_frame(Gfx::Painter& painter)
|
|||
{
|
||||
auto palette = WindowManager::the().palette();
|
||||
auto& window = m_window;
|
||||
Gfx::IntRect outer_rect = { {}, rect().size() };
|
||||
String title_text;
|
||||
if (window.client() && window.client()->is_unresponsive()) {
|
||||
StringBuilder builder;
|
||||
|
@ -192,7 +191,7 @@ void WindowFrame::paint_normal_frame(Gfx::Painter& painter)
|
|||
}
|
||||
|
||||
auto leftmost_button_rect = m_buttons.is_empty() ? Gfx::IntRect() : m_buttons.last().relative_rect();
|
||||
Gfx::WindowTheme::current().paint_normal_frame(painter, window_state_for_theme(), outer_rect, m_window.rect(), title_text, m_window.icon(), palette, leftmost_button_rect);
|
||||
Gfx::WindowTheme::current().paint_normal_frame(painter, window_state_for_theme(), m_window.rect(), title_text, m_window.icon(), palette, leftmost_button_rect);
|
||||
}
|
||||
|
||||
void WindowFrame::paint(Gfx::Painter& painter)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue