WindowServer: Don't draw titlebar separator for titlebar-less windows.

This commit is contained in:
Andreas Kling 2019-05-25 04:17:21 +02:00
parent 817ac9c22b
commit e478a2fb0a
Notes: sideshowbarker 2024-07-19 13:57:40 +09:00

View file

@ -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);