|
@@ -24,7 +24,7 @@ GroupBox::GroupBox(StringView title)
|
|
Margins GroupBox::content_margins() const
|
|
Margins GroupBox::content_margins() const
|
|
{
|
|
{
|
|
return {
|
|
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,
|
|
2,
|
|
2
|
|
2
|
|
@@ -38,7 +38,7 @@ void GroupBox::paint_event(PaintEvent& event)
|
|
|
|
|
|
Gfx::IntRect frame_rect {
|
|
Gfx::IntRect frame_rect {
|
|
0, (!m_title.is_empty() ? font().glyph_height() / 2 : 0),
|
|
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);
|
|
Gfx::StylePainter::paint_frame(painter, frame_rect, palette(), Gfx::FrameShape::Box, Gfx::FrameShadow::Sunken, 2);
|
|
|
|
|