mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:17:46 +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
|
@ -7,7 +7,7 @@
|
|||
#include <AK/FileSystemPath.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <SharedGraphics/Painter.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <LibGUI/GLock.h>
|
||||
|
||||
static GLockable<HashMap<String, RetainPtr<GraphicsBitmap>>>& thumbnail_cache()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "FontEditor.h"
|
||||
#include <SharedGraphics/Painter.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <LibGUI/GButton.h>
|
||||
#include <LibGUI/GLabel.h>
|
||||
#include <LibGUI/GTextBox.h>
|
||||
|
@ -158,7 +158,7 @@ Rect GlyphMapWidget::get_outer_rect(byte glyph) const
|
|||
|
||||
void GlyphMapWidget::paint_event(GPaintEvent&)
|
||||
{
|
||||
Painter painter(*this);
|
||||
GPainter painter(*this);
|
||||
painter.set_font(font());
|
||||
painter.fill_rect(rect(), Color::White);
|
||||
painter.draw_rect(rect(), Color::Black);
|
||||
|
@ -219,7 +219,7 @@ void GlyphEditorWidget::set_glyph(byte glyph)
|
|||
|
||||
void GlyphEditorWidget::paint_event(GPaintEvent&)
|
||||
{
|
||||
Painter painter(*this);
|
||||
GPainter painter(*this);
|
||||
painter.fill_rect(rect(), Color::White);
|
||||
painter.draw_rect(rect(), Color::Black);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "MemoryStatsWidget.h"
|
||||
#include <SharedGraphics/Painter.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <LibGUI/GBoxLayout.h>
|
||||
#include <LibGUI/GLabel.h>
|
||||
#include <LibGUI/GStyle.h>
|
||||
|
@ -104,7 +104,7 @@ void MemoryStatsWidget::timer_event(GTimerEvent&)
|
|||
|
||||
void MemoryStatsWidget::paint_event(GPaintEvent& event)
|
||||
{
|
||||
Painter painter(*this);
|
||||
GPainter painter(*this);
|
||||
painter.set_clip_rect(event.rect());
|
||||
GStyle::the().paint_surface(painter, rect());
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <AK/AKString.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <SharedGraphics/Font.h>
|
||||
#include <SharedGraphics/Painter.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <LibGUI/GApplication.h>
|
||||
#include <LibGUI/GWindow.h>
|
||||
|
@ -761,7 +761,7 @@ void Terminal::keydown_event(GKeyEvent& event)
|
|||
|
||||
void Terminal::paint_event(GPaintEvent&)
|
||||
{
|
||||
Painter painter(*this);
|
||||
GPainter painter(*this);
|
||||
|
||||
if (m_needs_background_fill) {
|
||||
m_needs_background_fill = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue