mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28:12 +00:00
LibGUI: Round up font sizes in various widget size calculations
This commit is contained in:
parent
c44bc58aaa
commit
f1e0eb8a25
5 changed files with 10 additions and 10 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue