From bfe5b0d1b7a13749642a94a8a75fd82b6401a9ae Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 11 Nov 2020 13:07:31 -0500 Subject: [PATCH] Adwaita: Don't do n-th child things for list rows Making the list row child css depend on the position is very expensive, and does not acutally work correctly (since we don't have widgets for all children, so the position of the child widget does not reflect the actual model item position). To make this more palatable, use the bottom border instead of the top border, since most lists have a natural border at the top (with headers), and may end up with empty space at the bottom. --- gtk/theme/Adwaita/_common.scss | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index a552965cdd..8b5c53bdec 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -3098,13 +3098,13 @@ list { > row.expander { padding: 0px; } > row.expander .row-header { padding: 2px; } - &.horizontal row.separator:not(:first-child), - &.separators.horizontal > row:not(:first-child) { + &.horizontal row.separator, + &.separators.horizontal > row { border-left: 1px solid $_treeview_borders_color; } - &:not(.horizontal) row.separator:not(:first-child), - &.separators:not(.horizontal) > row:not(:first-child) { - border-top: 1px solid $_treeview_borders_color; + &:not(.horizontal) row.separator, + &.separators:not(.horizontal) > row { + border-bottom: 1px solid $_treeview_borders_color; } }