mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibGUI: Round up font sizes in various widget size calculations
This commit is contained in:
@@ -24,7 +24,7 @@ GroupBox::GroupBox(StringView title)
|
||||
Margins GroupBox::content_margins() const
|
||||
{
|
||||
return {
|
||||
(!m_title.is_empty() ? font().glyph_height() + 1 /*room for the focus rect*/ : 2),
|
||||
(!m_title.is_empty() ? static_cast<int>(ceilf(font().glyph_height())) + 1 /*room for the focus rect*/ : 2),
|
||||
2,
|
||||
2,
|
||||
2
|
||||
@@ -38,7 +38,7 @@ void GroupBox::paint_event(PaintEvent& event)
|
||||
|
||||
Gfx::IntRect frame_rect {
|
||||
0, (!m_title.is_empty() ? font().glyph_height() / 2 : 0),
|
||||
width(), height() - (!m_title.is_empty() ? font().glyph_height() / 2 : 0)
|
||||
width(), height() - (!m_title.is_empty() ? static_cast<int>(ceilf(font().glyph_height())) / 2 : 0)
|
||||
};
|
||||
Gfx::StylePainter::paint_frame(painter, frame_rect, palette(), Gfx::FrameShape::Box, Gfx::FrameShadow::Sunken, 2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user