summaryrefslogtreecommitdiff
path: root/LibGUI/GFrame.cpp
blob: 8048ce779147cad1a64e2dc6797085cd9a0873a4 (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 <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());
}