[gnome-control-center] privacy: Simplify the rows' margins and spacing



commit e9a5f87080581a696c451199cbfb4a10ac5dbadb
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Tue Nov 27 11:55:52 2018 +0100

    privacy: Simplify the rows' margins and spacing
    
    Simplify the margins of the rows' items and diminish the spacing between
    the elements of a row. This will help the window to fit narrow screens.

 panels/privacy/cc-privacy-panel.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/panels/privacy/cc-privacy-panel.c b/panels/privacy/cc-privacy-panel.c
index 5ea35adc4..1f64d3b2b 100644
--- a/panels/privacy/cc-privacy-panel.c
+++ b/panels/privacy/cc-privacy-panel.c
@@ -303,8 +303,12 @@ add_row (CcPrivacyPanel *self,
 
   row = gtk_list_box_row_new ();
   gtk_widget_show (row);
-  box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 50);
+  box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 20);
   gtk_widget_show (box);
+  gtk_widget_set_margin_start (box, 20);
+  gtk_widget_set_margin_end (box, 20);
+  gtk_widget_set_margin_top (box, 18);
+  gtk_widget_set_margin_bottom (box, 18);
   gtk_container_add (GTK_CONTAINER (row), box);
   g_object_set_data (G_OBJECT (row), "dialog", dialog);
   gtk_widget_set_hexpand (box, TRUE);
@@ -313,16 +317,10 @@ add_row (CcPrivacyPanel *self,
   w = gtk_label_new (label);
   gtk_widget_show (w);
   gtk_widget_set_halign (w, GTK_ALIGN_START);
-  gtk_widget_set_margin_start (w, 20);
-  gtk_widget_set_margin_end (w, 20);
-  gtk_widget_set_margin_top (w, 18);
-  gtk_widget_set_margin_bottom (w, 18);
   gtk_widget_set_halign (w, GTK_ALIGN_START);
   gtk_widget_set_valign (w, GTK_ALIGN_CENTER);
   gtk_widget_set_hexpand (w, TRUE);
   gtk_box_pack_start (GTK_BOX (box), w, TRUE, TRUE, 0);
-  gtk_widget_set_margin_start (status, 20);
-  gtk_widget_set_margin_end (status, 20);
   gtk_widget_set_halign (status, GTK_ALIGN_END);
   gtk_widget_set_valign (status, GTK_ALIGN_CENTER);
   gtk_box_pack_end (GTK_BOX (box), status, FALSE, FALSE, 0);


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