LibGUI: Always paint Statusbar's vertical lines when not maximized

Fixes MasterWord's single Statusbar::Segment not painting vertical
lines despite its window being unmaximized. This was only an issue
for non-resizable windows as the Statusbar resizing corner otherwise
negates spans_entire_window_horizontally() when not maximized.
This commit is contained in:
thankyouverycool 2023-04-16 18:35:19 -04:00 committed by Andreas Kling
parent aefd6e9ee1
commit 7b05bf1c20
Notes: sideshowbarker 2024-07-17 07:43:44 +09:00

View File

@ -151,7 +151,8 @@ void Statusbar::Segment::paint_event(PaintEvent& event)
Painter painter(*this);
painter.add_clip_rect(event.rect());
Gfx::StylePainter::current().paint_frame(painter, rect(), palette(), m_shape, Gfx::FrameShadow::Sunken, m_thickness, spans_entire_window_horizontally());
bool skip_vertical_lines = window()->is_maximized() && spans_entire_window_horizontally();
Gfx::StylePainter::current().paint_frame(painter, rect(), palette(), m_shape, Gfx::FrameShadow::Sunken, m_thickness, skip_vertical_lines);
if (is_clickable())
Button::paint_event(event);