summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthankyouverycool <66646555+thankyouverycool@users.noreply.github.com>2021-02-21 19:08:23 -0500
committerAndreas Kling <kling@serenityos.org>2021-02-22 09:21:30 +0100
commitbbbcddb2529f46a90b6dfd58360b19eedf7e439f (patch)
tree030f5a20aa1d942ff6affa3a3bef0099d107127d
parent3e987eba2b39b137a78aafbfc6340eb375f219a6 (diff)
downloadserenity-bbbcddb2529f46a90b6dfd58360b19eedf7e439f.zip
LibGUI: Ignore glyph dimensions when painting a titleless GroupBox
-rw-r--r--Userland/Libraries/LibGUI/GroupBox.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGUI/GroupBox.cpp b/Userland/Libraries/LibGUI/GroupBox.cpp
index 4a60905452..258c61764b 100644
--- a/Userland/Libraries/LibGUI/GroupBox.cpp
+++ b/Userland/Libraries/LibGUI/GroupBox.cpp
@@ -50,8 +50,8 @@ void GroupBox::paint_event(PaintEvent& event)
painter.add_clip_rect(event.rect());
Gfx::IntRect frame_rect {
- 0, font().glyph_height() / 2,
- width(), height() - font().glyph_height() / 2
+ 0, (!m_title.is_empty() ? font().glyph_height() / 2 : 0),
+ width(), height() - (!m_title.is_empty() ? font().glyph_height() / 2 : 0)
};
Gfx::StylePainter::paint_frame(painter, frame_rect, palette(), Gfx::FrameShape::Box, Gfx::FrameShadow::Sunken, 2);