1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

LibGfx: Adjust ClassicWindowTheme titlebar height calculation

Use the Font::pixel_size() as reference, and put a little less vertical
padding around the text at sizes above the palette limit.
This commit is contained in:
Andreas Kling 2023-01-03 11:18:36 +01:00
parent 268d661138
commit b9d2b8f7b2

View file

@ -234,9 +234,9 @@ int ClassicWindowTheme::titlebar_height(WindowType window_type, WindowMode windo
case WindowType::Normal:
case WindowType::Notification: {
if (window_mode == WindowMode::RenderAbove)
return max(palette.window_title_height() - 4, title_font.glyph_height() + 4);
return max(palette.window_title_height() - 4, title_font.pixel_size() + 2);
else
return max(palette.window_title_height(), title_font.glyph_height() + 8);
return max(palette.window_title_height(), title_font.pixel_size() + 6);
}
default:
return 0;