From 03709792256b14bcfc131bb46bbc5e09fb9e3894 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 21 Oct 2022 07:55:15 -0400 Subject: [PATCH] theme: Fix up padding for the file chooser We need the padding inside the filelistcell, so that its event controllers cover the whole area. Introduce a .complex style class for columnviews that achieves that, and make the filechooser use it. --- gtk/theme/Default/_common.scss | 24 ++++++++++++++++++++++++ gtk/ui/gtkfilechooserwidget.ui | 3 +++ 2 files changed, 27 insertions(+) diff --git a/gtk/theme/Default/_common.scss b/gtk/theme/Default/_common.scss index af11adc527..b6f2f39e14 100644 --- a/gtk/theme/Default/_common.scss +++ b/gtk/theme/Default/_common.scss @@ -3369,6 +3369,30 @@ columnview row:not(:selected) cell editablelabel.editing text selection { } } +/******************************************************** + * Complex Lists * + * Put padding on the cell content so event controllers * + * can cover the whole area. * + ********************************************************/ + +columnview.complex { + > listview > row > cell { + padding: 0; + > * { + padding: 8px 6px; + } + } + + // shrink vertically for .data-table + &.data-table > listview > row > cell { + padding: 0; + > * { + padding-top: 2px; + padding-bottom: 2px; + } + } +} + /********************* * App Notifications * *********************/ diff --git a/gtk/ui/gtkfilechooserwidget.ui b/gtk/ui/gtkfilechooserwidget.ui index 703c956a3c..4a55e83d9c 100644 --- a/gtk/ui/gtkfilechooserwidget.ui +++ b/gtk/ui/gtkfilechooserwidget.ui @@ -141,6 +141,9 @@ 1 + -- 2.30.2