mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 11:42:38 +03:00
4ab0cd5d4c
This way it can be used by others who might not have a GFrame object.
23 lines
472 B
C++
23 lines
472 B
C++
#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());
|
|
}
|