From 41dc73adc46e040f6de5353fa9ace22da7199766 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 9 May 2021 10:11:30 +0200 Subject: Demos: Fix a bunch of incorrect use of GUI::PaintEvent::rect() A bunch of programs were using the paint event rect as the rect to draw into. Since the event rect could be any invalidated part of the widget, we need to be passing the full Widget::rect(). --- Userland/Demos/GLTeapot/main.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Userland/Demos/GLTeapot') diff --git a/Userland/Demos/GLTeapot/main.cpp b/Userland/Demos/GLTeapot/main.cpp index 0107db298f..dead9e6d6a 100644 --- a/Userland/Demos/GLTeapot/main.cpp +++ b/Userland/Demos/GLTeapot/main.cpp @@ -62,9 +62,7 @@ void GLContextWidget::paint_event(GUI::PaintEvent& event) { GUI::Painter painter(*this); painter.add_clip_rect(event.rect()); - - /* Blit it! */ - painter.draw_scaled_bitmap(event.rect(), *m_bitmap, m_bitmap->rect()); + painter.draw_scaled_bitmap(rect(), *m_bitmap, m_bitmap->rect()); } void GLContextWidget::timer_event(Core::TimerEvent&) -- cgit v1.2.3