Skip to content

css: Don't conflict with drop target visual feedback

While dragging items over the list view, the row which accepts drops in the current pointer position has its top border highlighted, but not the bottom border, as indended by the default stylesheet.

This had already been fixed.[1] The regression happened because GTK has stopped using .dnd style class, instead using :drop(active).[2]

The previous fix ([1]) consisted in not highlighting any border at all, with the rationale that "we already modify the icon to hint about dnd". This is based on the assumptions that:

1. folder icons change to the folder-open icon;
2. folders are the only drop targets.

But these assumptions do not hold:

1. the folder-open icon is not used if a folder has a custom image
   instead of the default icon, or if a thumbnailer is installed;
2. some non-folder items, such as archive files, accept drops too.

So let's fix this the other way around: highlighting both borders, above and below, as intended by the default stylesheet.

Closes #1525 (closed)

[1] 4963cd7d [2] gtk@12c5ca5c

Merge request reports