Skip to content
Commit 404996a8 authored by António Fernandes's avatar António Fernandes Committed by António Fernandes
Browse files

list-view: Draw thumbnail shadow in advance

Cell renderers do not have their own style context, so style classes
are applied to the tree view widget as a whole.

In order to workaround this, the thumbnail shadows have been achieved
using a css class on the whole tree view which is flipped on/off
when getting the data for each row.

This was assumedly a fragile hack, but it turns out to be worse than
that: changing the view style repeatedly hurts the performance when
loading directories with many thumbnailable files, even freezing the
application.

Let's render the shadow ourselves and immediately restore the style
context to its original state, which fixes the performance bug and is
also a more solid solution.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2169
parent 9fd9b95b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment