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

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

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