ladybird/Libraries/LibGUI/GFrame.cpp
Andreas Kling 1c0669f010 LibDraw: Introduce (formerly known as SharedGraphics.)
Instead of LibGUI and WindowServer building their own copies of the drawing
and graphics code, let's it in a separate LibDraw library.

This avoids building the code twice, and will encourage better separation
of concerns. :^)
2019-07-18 10:18:16 +02:00

23 lines
465 B
C++

#include <LibGUI/GFrame.h>
#include <LibGUI/GPainter.h>
#include <LibDraw/StylePainter.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());
}