summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/ItemView.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-18 21:23:39 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-18 21:23:39 +0200
commit54c980dbf228a17c7814fafd304f57047a82c284 (patch)
treee31c8f1ce4bc62d9ea5d9f18b604edb7cd9398a8 /Libraries/LibGUI/ItemView.cpp
parent95805c0e56d8b15c93a6bbc91948a37f7fcb7bd7 (diff)
downloadserenity-54c980dbf228a17c7814fafd304f57047a82c284.zip
LibGUI: Make ItemView respect Widget::fill_with_background_color()
This makes it possible to create a see-through ItemView. :^)
Diffstat (limited to 'Libraries/LibGUI/ItemView.cpp')
-rw-r--r--Libraries/LibGUI/ItemView.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Libraries/LibGUI/ItemView.cpp b/Libraries/LibGUI/ItemView.cpp
index cc385f8a81..bd67b281f0 100644
--- a/Libraries/LibGUI/ItemView.cpp
+++ b/Libraries/LibGUI/ItemView.cpp
@@ -273,7 +273,8 @@ void ItemView::paint_event(PaintEvent& event)
Painter painter(*this);
painter.add_clip_rect(widget_inner_rect());
painter.add_clip_rect(event.rect());
- painter.fill_rect(event.rect(), widget_background_color);
+ if (fill_with_background_color())
+ painter.fill_rect(event.rect(), widget_background_color);
painter.translate(frame_thickness(), frame_thickness());
painter.translate(-horizontal_scrollbar().value(), -vertical_scrollbar().value());