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