[gnome-todo] list-selector-grid: make spacing homogeneous in icon grid



commit 195bc5f79aefa5e6a5b3de1027c096c69e9b3365
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sun Oct 15 16:27:36 2017 -0200

    list-selector-grid: make spacing homogeneous in icon grid

 data/ui/list-selector-grid-item.ui |    8 +-------
 src/views/gtd-list-selector-grid.c |    4 ++--
 2 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/data/ui/list-selector-grid-item.ui b/data/ui/list-selector-grid-item.ui
index a1b327b..7753cc2 100644
--- a/data/ui/list-selector-grid-item.ui
+++ b/data/ui/list-selector-grid-item.ui
@@ -33,10 +33,9 @@
                   <object class="GtkImage" id="icon_image">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="halign">center</property>
                     <property name="width_request">192</property>
                     <property name="height_request">192</property>
-                    <property name="pixel_size">64</property>
-                    <property name="icon_name">folder-documents-symbolic</property>
                   </object>
                 </child>
                 <child type="overlay">
@@ -51,11 +50,6 @@
                         <property name="height_request">32</property>
                         <property name="can_focus">False</property>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
diff --git a/src/views/gtd-list-selector-grid.c b/src/views/gtd-list-selector-grid.c
index af2f121..19b36cb 100644
--- a/src/views/gtd-list-selector-grid.c
+++ b/src/views/gtd-list-selector-grid.c
@@ -409,7 +409,7 @@ gtd_list_selector_grid_init (GtdListSelectorGrid *self)
   widget = GTK_WIDGET (self);
   flowbox = GTK_FLOW_BOX (self);
 
-  gtk_flow_box_set_max_children_per_line (flowbox, 100);
+  gtk_flow_box_set_max_children_per_line (flowbox, 9);
   gtk_flow_box_set_selection_mode (flowbox, GTK_SELECTION_NONE);
   gtk_flow_box_set_column_spacing (flowbox, 12);
   gtk_flow_box_set_row_spacing (flowbox, 12);
@@ -417,7 +417,7 @@ gtd_list_selector_grid_init (GtdListSelectorGrid *self)
   gtk_container_set_border_width (GTK_CONTAINER (self), 12);
   gtk_widget_set_hexpand (widget, TRUE);
   gtk_widget_set_vexpand (widget, TRUE);
-  gtk_widget_set_halign (widget, GTK_ALIGN_START);
+  gtk_widget_set_halign (widget, GTK_ALIGN_FILL);
   gtk_widget_set_valign (widget, GTK_ALIGN_START);
   gtk_widget_show_all (widget);
 }


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