[nautilus/wip/antoniof/flow-box-preparation: 42/68] view-icon-controller: Set padding, not margin




commit 02a4c2f052cf79ad2af31894370dbd00562ceb91
Author: António Fernandes <antoniof gnome org>
Date:   Tue Aug 31 23:04:48 2021 +0100

    view-icon-controller: Set padding, not margin
    
    The margin is outside of the widget, so it doesn't allow, e.g.,
    starting rubberband selection or opening background context menu.

 src/nautilus-view-icon-controller.c | 4 ----
 src/resources/css/Adwaita.css       | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-view-icon-controller.c b/src/nautilus-view-icon-controller.c
index 60febdddc..b4746efd5 100644
--- a/src/nautilus-view-icon-controller.c
+++ b/src/nautilus-view-icon-controller.c
@@ -1060,10 +1060,6 @@ create_view_ui (NautilusViewIconController *self)
     widget = gtk_flow_box_new ();
     gtk_widget_set_can_focus (widget, TRUE);
     gtk_widget_set_valign (widget, GTK_ALIGN_START);
-    gtk_widget_set_margin_top (widget, 10);
-    gtk_widget_set_margin_start (widget, 10);
-    gtk_widget_set_margin_bottom (widget, 10);
-    gtk_widget_set_margin_end (widget, 10);
 
     flowbox = GTK_FLOW_BOX (widget);
     gtk_flow_box_set_activate_on_single_click (flowbox, FALSE);
diff --git a/src/resources/css/Adwaita.css b/src/resources/css/Adwaita.css
index 448c2cade..a1f500fe7 100644
--- a/src/resources/css/Adwaita.css
+++ b/src/resources/css/Adwaita.css
@@ -210,6 +210,10 @@ entry.search > * {
 }
 
 /* Icon view */
+flowbox {
+  padding: 10px
+}
+
 flowboxchild:selected {
   background-color:transparent;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]