1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

LibGUI: Don't try to paint items in model-less IconView :^)

Fixes #6079.
This commit is contained in:
Andreas Kling 2021-04-03 20:36:43 +02:00
parent f1ea092d8f
commit 64d4921f35

View file

@ -515,6 +515,9 @@ void IconView::paint_event(PaintEvent& event)
painter.fill_rect(event.rect(), fill_with_background_color() ? widget_background_color : Color::Transparent);
if (!model())
return;
painter.translate(frame_thickness(), frame_thickness());
painter.translate(-horizontal_scrollbar().value(), -vertical_scrollbar().value());