theme: Fix up padding for the file chooser
authorMatthias Clasen <mclasen@redhat.com>
Fri, 21 Oct 2022 11:55:15 +0000 (07:55 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 21 Oct 2022 12:28:58 +0000 (08:28 -0400)
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
gtk/ui/gtkfilechooserwidget.ui

index af11adc5270c73068db46fe1f82e1411b31aa0ab..b6f2f39e1410925229069d1375863a39f5b310dd 100644 (file)
@@ -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 *
  *********************/
index 703c956a3c3a289ae2adeb3b45506320695b444c..4a55e83d9ccdd260171d30370fcdfc45b3f3e72f 100644 (file)
                                         <property name="vexpand">1</property>
                                         <child>
                                           <object class="GtkColumnView" id="browse_files_column_view">
+                                            <style>
+                                              <class name="complex"/>
+                                            </style>
                                             <signal name="activate" handler="column_view_row_activated_cb" swapped="no"/>
                                             <signal name="keynav-failed" handler="browse_files_column_view_keynav_failed_cb"/>
                                             <child>