summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/GFrame.cpp
blob: 8854bb5e03f8f29a38700d37910f00585a18125b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#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());
}