LibGUI: Don't fill IconView item text background unless actually wanted

We were always filling the rect behind item texts, even when the widget
had fill_with_background_color() == false.
This commit is contained in:
Andreas Kling 2020-12-16 19:33:46 +01:00
parent 4236127fb9
commit 226ac8a47b
Notes: sideshowbarker 2024-07-19 00:47:26 +09:00

View file

@ -499,7 +499,8 @@ void IconView::paint_event(PaintEvent& event)
if (item_data.selected) {
background_color = is_focused() ? palette().selection() : palette().inactive_selection();
} else {
background_color = widget_background_color;
if (fill_with_background_color())
background_color = widget_background_color;
}
auto icon = item_data.index.data(ModelRole::Icon);