summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2020-06-21 15:35:48 +0100
committerOndrej Holy <oholy@redhat.com>2021-02-08 16:53:21 +0000
commitf0c73780acc782d061646c8f16354d4377370a2e (patch)
treec7ad0744bb9b6637df508cf5832fc92d8c274f74
parent127c7968c2d2cd911c2ea2bd9823eaa8ce926b44 (diff)
downloadnautilus-f0c73780acc782d061646c8f16354d4377370a2e.tar.gz
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 https://gitlab.gnome.org/GNOME/nautilus/-/issues/1525 [1] https://gitlab.gnome.org/GNOME/nautilus/-/commit/4963cd7d564b633299f8e31bb8ac10f67eae6477 [2] https://gitlab.gnome.org/GNOME/gtk/-/commit/12c5ca5c013e035374ad1590b0e64cb7a452aa30
-rw-r--r--src/resources/css/Adwaita.css11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/resources/css/Adwaita.css b/src/resources/css/Adwaita.css
index 546d3e98a..26a86cd18 100644
--- a/src/resources/css/Adwaita.css
+++ b/src/resources/css/Adwaita.css
@@ -158,8 +158,10 @@ entry.search > * {
color: shade(@disk_space_free, 0.7);
}
-/* View */
-.nautilus-list-view .view {
+/* As a workaround for GtkTreeView showing thick border above first row when
+ * horizontal grid lines are enabled, we add them using CSS instead. Exclude the
+ * drop targets to let through the default feedback style. */
+.nautilus-list-view .view:not(:drop(active)) {
border-bottom: 1px solid @theme_bg_color;
}
@@ -169,11 +171,6 @@ entry.search > * {
padding:2px;
}
-/* Hide superfluous treeview drop target indication */
-.nautilus-list-view .view.dnd {
- border-style: none;
-}
-
@define-color conflict_bg #fef6b6;
.conflict-row {