Browse Source

LibGUI: Clip rubber band to IconView widget content area

Add a clip rect for the rubber band painter of widget_inner_rect
This ensures the rubber band is not drawn over the scrollbars.

Fixes #3926
Joseph Bywater 4 năm trước cách đây
mục cha
commit
348cd0fdc1
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      Libraries/LibGUI/IconView.cpp

+ 1 - 0
Libraries/LibGUI/IconView.cpp

@@ -471,6 +471,7 @@ void IconView::second_paint_event(PaintEvent& event)
 
     Painter painter(*this);
     painter.add_clip_rect(event.rect());
+    painter.add_clip_rect(widget_inner_rect());
     painter.translate(frame_thickness(), frame_thickness());
     painter.translate(-horizontal_scrollbar().value(), -vertical_scrollbar().value());