mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-04-25 22:13:13 +00:00
LibHTML: Always fill the entire paint event rect with background
And do the filling before translating the painter. This fixes a bug where scrolling down in the Help app would render the bottom part of the page with a different background color.
This commit is contained in:
@@ -85,11 +85,11 @@ void HtmlView::paint_event(GPaintEvent& event)
|
||||
return;
|
||||
}
|
||||
|
||||
painter.fill_rect(event.rect(), m_document->background_color());
|
||||
|
||||
painter.translate(frame_thickness(), frame_thickness());
|
||||
painter.translate(-horizontal_scrollbar().value(), -vertical_scrollbar().value());
|
||||
|
||||
painter.fill_rect(rect(), m_document->background_color());
|
||||
|
||||
RenderingContext context { painter };
|
||||
m_layout_root->render(context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user