mirror of
https://github.com/RGBCube/serenity
synced 2025-07-06 02:17:34 +00:00
LibGUI: Add a GPainter class that inherits from Painter.
This gets rid of the last little piece of LibGUI knowledge in Painter.
This commit is contained in:
parent
326c6fd607
commit
9fa21fa585
27 changed files with 75 additions and 78 deletions
|
@ -5,7 +5,7 @@
|
|||
#include <LibGUI/GLayout.h>
|
||||
#include <AK/Assertions.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <SharedGraphics/Painter.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
|
@ -85,13 +85,13 @@ void GWidget::handle_paint_event(GPaintEvent& event)
|
|||
{
|
||||
ASSERT(is_visible());
|
||||
if (fill_with_background_color()) {
|
||||
Painter painter(*this);
|
||||
GPainter painter(*this);
|
||||
painter.fill_rect(event.rect(), background_color());
|
||||
} else {
|
||||
#ifdef DEBUG_WIDGET_UNDERDRAW
|
||||
// FIXME: This is a bit broken.
|
||||
// If the widget is not opaque, let's not mess it up with debugging color.
|
||||
Painter painter(*this);
|
||||
GPainter painter(*this);
|
||||
painter.fill_rect(rect(), Color::Red);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue