Bladeren bron

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.
Andreas Kling 2 jaren geleden
bovenliggende
commit
b9d2b8f7b2
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      Userland/Libraries/LibGfx/ClassicWindowTheme.cpp

+ 2 - 2
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;