mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28: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
|
@ -150,7 +150,7 @@ void GraphWidget::paint_event(GUI::PaintEvent& event)
|
|||
continue;
|
||||
auto constrain_rect = inner_rect.shrunken(8, 8);
|
||||
auto text_rect = constrain_rect.translated(0, y).intersected(constrain_rect);
|
||||
text_rect.set_height(font().glyph_height());
|
||||
text_rect.set_height(font().pixel_size_rounded_up());
|
||||
auto text = format.text_formatter(current_values[i]);
|
||||
if (format.text_shadow_color != Color::Transparent)
|
||||
painter.draw_text(text_rect.translated(1, 1), text, Gfx::TextAlignment::CenterRight, format.text_shadow_color);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue