2019-03-28 15:30:29 +01:00
|
|
|
#include <LibGUI/GFrame.h>
|
2019-03-28 17:19:56 +01:00
|
|
|
#include <LibGUI/GPainter.h>
|
2019-07-18 10:15:00 +02:00
|
|
|
#include <LibDraw/StylePainter.h>
|
2019-03-28 15:30:29 +01:00
|
|
|
|
|
|
|
GFrame::GFrame(GWidget* parent)
|
|
|
|
: GWidget(parent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
GFrame::~GFrame()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void GFrame::paint_event(GPaintEvent& event)
|
|
|
|
{
|
2019-04-10 03:43:46 +02:00
|
|
|
if (m_shape == FrameShape::NoFrame)
|
2019-03-28 15:30:29 +01:00
|
|
|
return;
|
|
|
|
|
2019-03-28 17:19:56 +01:00
|
|
|
GPainter painter(*this);
|
2019-03-29 15:01:54 +01:00
|
|
|
painter.add_clip_rect(event.rect());
|
2019-04-10 03:43:46 +02:00
|
|
|
StylePainter::paint_frame(painter, rect(), m_shape, m_shadow, m_thickness, spans_entire_window_horizontally());
|
2019-03-28 15:30:29 +01:00
|
|
|
}
|