From 9714e61d62f2b098de28763781e17b6780d9fdbd Mon Sep 17 00:00:00 2001 From: Sarah Date: Mon, 10 Aug 2020 08:45:40 +1000 Subject: [PATCH] ClassicWindowTheme: Fix titlebar redraw issues This fixes titlebar rects being overly large and leaving smeary undrawn areas when using a theme with a titlebar height different to 19px. --- Libraries/LibGfx/ClassicWindowTheme.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Libraries/LibGfx/ClassicWindowTheme.cpp b/Libraries/LibGfx/ClassicWindowTheme.cpp index 69ef6887876..83c6a709519 100644 --- a/Libraries/LibGfx/ClassicWindowTheme.cpp +++ b/Libraries/LibGfx/ClassicWindowTheme.cpp @@ -109,7 +109,8 @@ IntRect ClassicWindowTheme::title_bar_rect(WindowType window_type, const IntRect { auto& title_font = Font::default_bold_font(); auto window_titlebar_height = palette.window_title_height(); - int total_vertical_padding = window_titlebar_height - title_font.glyph_height(); + // 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; if (window_type == WindowType::Notification) return { window_rect.width() + 3, total_vertical_padding / 2 - 1, window_titlebar_height, window_rect.height() };