1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:47:34 +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:
Andreas Kling 2023-03-03 19:32:19 +01:00
parent 93c9344e35
commit b71c7a6e44
32 changed files with 63 additions and 65 deletions

View file

@ -131,7 +131,7 @@ IntRect ClassicWindowTheme::titlebar_rect(WindowType window_type, WindowMode win
auto& title_font = FontDatabase::window_title_font();
auto window_titlebar_height = titlebar_height(window_type, window_mode, palette);
// FIXME: The top of the titlebar doesn't get redrawn properly if this padding is different
int total_vertical_padding = title_font.glyph_height() - 1;
int total_vertical_padding = title_font.pixel_size_rounded_up() - 1;
if (window_type == WindowType::Notification)
return { window_rect.width() + 3, total_vertical_padding / 2 - 1, window_titlebar_height, window_rect.height() };