LibGUI: Ignore glyph dimensions when painting a titleless GroupBox
This commit is contained in:
parent
3e987eba2b
commit
bbbcddb252
Notes:
sideshowbarker
2024-07-18 22:00:56 +09:00
Author: https://github.com/thankyouverycool Commit: https://github.com/SerenityOS/serenity/commit/bbbcddb2529 Pull-request: https://github.com/SerenityOS/serenity/pull/5470
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue