From e478a2fb0ab8b1b392e4dd0bfaa7eafb7d12c6a4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 25 May 2019 04:17:21 +0200 Subject: WindowServer: Don't draw titlebar separator for titlebar-less windows. --- Servers/WindowServer/WSWindowFrame.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Servers/WindowServer/WSWindowFrame.cpp b/Servers/WindowServer/WSWindowFrame.cpp index 2defdd9035..7a3c3ccee7 100644 --- a/Servers/WindowServer/WSWindowFrame.cpp +++ b/Servers/WindowServer/WSWindowFrame.cpp @@ -195,12 +195,13 @@ void WSWindowFrame::paint(Painter& painter) middle_border_color = Color::MidGray; } - painter.draw_line(titlebar_rect.bottom_left().translated(0, 1), titlebar_rect.bottom_right().translated(0, 1), Color::LightGray); StylePainter::paint_window_frame(painter, outer_rect); if (!window.show_titlebar()) return; + painter.draw_line(titlebar_rect.bottom_left().translated(0, 1), titlebar_rect.bottom_right().translated(0, 1), Color::LightGray); + auto leftmost_button_rect = m_buttons.is_empty() ? Rect() : m_buttons.last()->relative_rect(); painter.fill_rect_with_gradient(titlebar_rect, border_color, border_color2); -- cgit v1.2.3