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

Rename Painter::set_clip_rect() to add_clip_rect().

It was confusing to see multiple calls to set_foo() in a row. Since this is
an intersecting operation, let's call it add_clip_rect() instead.
This commit is contained in:
Andreas Kling 2019-03-29 15:01:54 +01:00
parent 474340b9cd
commit f249c40aaa
18 changed files with 28 additions and 28 deletions

View file

@ -57,7 +57,7 @@ public:
virtual void paint_event(GPaintEvent& event) override
{
GPainter painter(*this);
painter.set_clip_rect(event.rect());
painter.add_clip_rect(event.rect());
painter.translate(rect().center().x() - 1, 0);
painter.draw_line({ 0, 0 }, { 0, rect().bottom() }, Color::MidGray);
painter.draw_line({ 1, 0 }, { 1, rect().bottom() }, Color::White);
@ -78,6 +78,6 @@ void GToolBar::add_separator()
void GToolBar::paint_event(GPaintEvent& event)
{
GPainter painter(*this);
painter.set_clip_rect(event.rect());
painter.add_clip_rect(event.rect());
StylePainter::the().paint_surface(painter, rect(), !spans_entire_window_horizontally());
}