mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
Userland: Use Font::pixel_size_rounded_up() instead of glyph_height()
The only remaining clients of this API are specific to bitmap fonts and editing thereof.
This commit is contained in:
parent
93c9344e35
commit
b71c7a6e44
32 changed files with 63 additions and 65 deletions
|
@ -105,7 +105,7 @@ void Button::paint_event(PaintEvent& event)
|
|||
content_rect.set_width(content_rect.width() - m_icon->width() - icon_spacing());
|
||||
}
|
||||
|
||||
Gfx::IntRect text_rect { 0, 0, static_cast<int>(ceilf(font.width(text()))), font.glyph_height() };
|
||||
Gfx::IntRect text_rect { 0, 0, static_cast<int>(ceilf(font.width(text()))), font.pixel_size_rounded_up() };
|
||||
if (text_rect.width() > content_rect.width())
|
||||
text_rect.set_width(content_rect.width());
|
||||
text_rect.align_within(content_rect, text_alignment());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue