1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:07:45 +00:00

LibGfx+Userland: Add width_rounded_up() helper

This commit is contained in:
thankyouverycool 2023-04-14 08:52:47 -04:00 committed by Andreas Kling
parent c9404c3a63
commit 55423b4ed0
21 changed files with 34 additions and 19 deletions

View file

@ -116,7 +116,7 @@ void Label::size_to_fit()
int Label::text_calculated_preferred_width() const
{
return static_cast<int>(ceilf(font().width(m_text))) + m_autosize_padding * 2;
return font().width_rounded_up(m_text) + m_autosize_padding * 2;
}
int Label::text_calculated_preferred_height() const