ladybird/LibGUI/GFrame.cpp
Andreas Kling 4ab0cd5d4c LibGUI: Move frame painting from GFrame to StylePainter.
This way it can be used by others who might not have a GFrame object.
2019-04-10 03:43:46 +02:00

23 lines
472 B
C++

#include <LibGUI/GFrame.h>
#include <SharedGraphics/StylePainter.h>
#include <LibGUI/GPainter.h>
GFrame::GFrame(GWidget* parent)
: GWidget(parent)
{
}
GFrame::~GFrame()
{
}
void GFrame::paint_event(GPaintEvent& event)
{
if (m_shape == FrameShape::NoFrame)
return;
GPainter painter(*this);
painter.add_clip_rect(event.rect());
StylePainter::paint_frame(painter, rect(), m_shape, m_shadow, m_thickness, spans_entire_window_horizontally());
}