[gnome-control-center] region: Reduce size of input rows



commit a193417b32c3f4dd707d60c59193115b9f97194d
Author: Robert Ancell <robert ancell canonical com>
Date:   Mon Nov 19 11:16:15 2018 +1300

    region: Reduce size of input rows
    
    This matches the new designs in
    
https://gitlab.gnome.org/Teams/Design/settings-mockups/blob/master/region-and-language/region-and-language.png

 panels/region/cc-input-row.ui    | 2 +-
 panels/region/cc-region-panel.c  | 3 +++
 panels/region/cc-region-panel.ui | 7 ++++++-
 3 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/panels/region/cc-input-row.ui b/panels/region/cc-input-row.ui
index 3ba52bace..1f7c893f7 100644
--- a/panels/region/cc-input-row.ui
+++ b/panels/region/cc-input-row.ui
@@ -7,7 +7,7 @@
     <child>
       <object class="GtkBox">
         <property name="visible">True</property>
-        <property name="border-width">18</property>
+        <property name="border-width">12</property>
         <property name="spacing">12</property>
         <child>
           <object class="GtkLabel" id="name_label">
diff --git a/panels/region/cc-region-panel.c b/panels/region/cc-region-panel.c
index 7d5fbeb8c..45e886042 100644
--- a/panels/region/cc-region-panel.c
+++ b/panels/region/cc-region-panel.c
@@ -65,6 +65,7 @@ struct _CcRegionPanel {
         GtkListBoxRow   *formats_row;
         GtkListBox      *input_list;
         GtkBox          *input_section_box;
+        GtkSizeGroup    *input_size_group;
         GtkToggleButton *login_button;
         GtkLabel        *login_label;
         GtkLabel        *language_label;
@@ -803,6 +804,7 @@ add_input_row (CcRegionPanel *self, CcInputSource *source)
 
         row = cc_input_row_new (source);
         gtk_widget_show (GTK_WIDGET (row));
+        gtk_size_group_add_widget (self->input_size_group, GTK_WIDGET (row));
         g_signal_connect_object (row, "show-settings", G_CALLBACK (row_settings_cb), self, 
G_CONNECT_SWAPPED);
         g_signal_connect_object (row, "show-layout", G_CALLBACK (row_layout_cb), self, G_CONNECT_SWAPPED);
         g_signal_connect_object (row, "remove-row", G_CALLBACK (row_removed_cb), self, G_CONNECT_SWAPPED);
@@ -1607,6 +1609,7 @@ cc_region_panel_class_init (CcRegionPanelClass * klass)
         gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, formats_row);
         gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, input_list);
         gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, input_section_box);
+        gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, input_size_group);
         gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, login_label);
         gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, language_label);
         gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, language_list);
diff --git a/panels/region/cc-region-panel.ui b/panels/region/cc-region-panel.ui
index f9a2cbc00..740c1ac50 100644
--- a/panels/region/cc-region-panel.ui
+++ b/panels/region/cc-region-panel.ui
@@ -266,7 +266,6 @@
                               <object class="GtkLabel">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="margin">18</property>
                                 <property name="label" translatable="yes">No input source selected</property>
                               </object>
                             </child>
@@ -610,4 +609,10 @@
       </object>
     </child>
   </object>
+  <object class="GtkSizeGroup" id="input_size_group">
+    <property name="mode">vertical</property>
+    <widgets>
+      <widget name="no_inputs_row"/>
+    </widgets>
+  </object>
 </interface>


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