mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
LibGfx+Userland: Add width_rounded_up() helper
This commit is contained in:
parent
c9404c3a63
commit
55423b4ed0
21 changed files with 34 additions and 19 deletions
|
@ -428,7 +428,7 @@ void IconView::get_item_rects(int item_index, ItemData& item_data, Gfx::Font con
|
|||
item_data.icon_offset_y = -font.pixel_size_rounded_up() - 6;
|
||||
item_data.icon_rect.translate_by(0, item_data.icon_offset_y);
|
||||
|
||||
int unwrapped_text_width = static_cast<int>(ceilf(font.width(item_data.text)));
|
||||
int unwrapped_text_width = font.width_rounded_up(item_data.text);
|
||||
int available_width = item_rect.width() - 6;
|
||||
|
||||
item_data.text_rect = { 0, item_data.icon_rect.bottom() + 6 + 1, 0, font.pixel_size_rounded_up() };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue