mirror of
https://github.com/RGBCube/serenity
synced 2025-06-28 17:02: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
|
@ -279,8 +279,8 @@ Optional<UISize> Button::calculated_min_size() const
|
|||
|
||||
if (!text().is_empty()) {
|
||||
auto& font = this->font();
|
||||
horizontal = font.width(text()) + 2;
|
||||
vertical = font.glyph_height() + 4; // FIXME: Use actual maximum total height
|
||||
horizontal = static_cast<int>(ceilf(font.width(text()))) + 2;
|
||||
vertical = static_cast<int>(ceilf(font.pixel_size())) + 4; // FIXME: Use actual maximum total height
|
||||
}
|
||||
|
||||
if (m_icon) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue