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




commit d36f447dc38505385258de4e792302ae3c677777
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 cb88c442c..677db77cc 100644
--- a/src/nautilus-view-icon-controller.c
+++ b/src/nautilus-view-icon-controller.c
@@ -1058,10 +1058,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 03acabd4a..27986edba 100644
--- a/src/resources/css/Adwaita.css
+++ b/src/resources/css/Adwaita.css
@@ -199,6 +199,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]