diff options
author | Andreas Kling <kling@serenityos.org> | 2023-01-03 11:18:36 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-01-03 15:25:02 +0100 |
commit | b9d2b8f7b2ef05d62949b8f1c17016428f7c661c (patch) | |
tree | c6bc382663440ef9ecdac76a9e6249bca8212e95 /Userland/Libraries | |
parent | 268d6611380d65afeb381e1914ade001c1ac8079 (diff) | |
download | serenity-b9d2b8f7b2ef05d62949b8f1c17016428f7c661c.zip |
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.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibGfx/ClassicWindowTheme.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGfx/ClassicWindowTheme.cpp b/Userland/Libraries/LibGfx/ClassicWindowTheme.cpp index c0dd925d6d..67d1b72ea3 100644 --- a/Userland/Libraries/LibGfx/ClassicWindowTheme.cpp +++ b/Userland/Libraries/LibGfx/ClassicWindowTheme.cpp @@ -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; |