1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

LibGUI: Implement content_margins for GroupBox

This commit is contained in:
FrHun 2021-09-28 15:42:25 +02:00 committed by Andreas Kling
parent 72139e1262
commit 4955769ab8
2 changed files with 11 additions and 0 deletions

View file

@ -24,6 +24,16 @@ GroupBox::~GroupBox()
{
}
Margins GroupBox::content_margins() const
{
return {
(!m_title.is_empty() ? font().glyph_height() + 1 /*room for the focus rect*/ : 2),
2,
2,
2
};
}
void GroupBox::paint_event(PaintEvent& event)
{
Painter painter(*this);