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

LibGfx: Make Font::width() return a float

This commit is contained in:
Andreas Kling 2023-01-03 14:43:07 +01:00
parent b9d2b8f7b2
commit 3407ab0fd1
25 changed files with 40 additions and 40 deletions

View file

@ -196,7 +196,7 @@ void BookmarksBarWidget::model_did_update(unsigned)
auto title = model()->index(item_index, 0).data().to_deprecated_string();
auto url = model()->index(item_index, 1).data().to_deprecated_string();
Gfx::IntRect rect { width, 0, font().width(title) + 32, height() };
Gfx::IntRect rect { width, 0, static_cast<int>(ceilf(font().width(title))) + 32, height() };
auto& button = add<GUI::Button>();
m_bookmarks.append(button);