Quellcode durchsuchen

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.
thankyouverycool vor 2 Jahren
Ursprung
Commit
7b05bf1c20
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      Userland/Libraries/LibGUI/Statusbar.cpp

+ 2 - 1
Userland/Libraries/LibGUI/Statusbar.cpp

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