mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:17:35 +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:
parent
4173c77eb5
commit
56d1ae98bc
1 changed files with 2 additions and 2 deletions
|
@ -85,11 +85,11 @@ void HtmlView::paint_event(GPaintEvent& event)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
painter.fill_rect(event.rect(), m_document->background_color());
|
||||||
|
|
||||||
painter.translate(frame_thickness(), frame_thickness());
|
painter.translate(frame_thickness(), frame_thickness());
|
||||||
painter.translate(-horizontal_scrollbar().value(), -vertical_scrollbar().value());
|
painter.translate(-horizontal_scrollbar().value(), -vertical_scrollbar().value());
|
||||||
|
|
||||||
painter.fill_rect(rect(), m_document->background_color());
|
|
||||||
|
|
||||||
RenderingContext context { painter };
|
RenderingContext context { painter };
|
||||||
m_layout_root->render(context);
|
m_layout_root->render(context);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue