[gnome-software] shell: limit the width of the app list boxes to 860 pixels



commit 8886ff134839938ebc5eee4532f206161bb84052
Author: Rafal Luzynski <digitalfreak lingonborough com>
Date:   Fri Dec 18 09:48:08 2015 +0100

    shell: limit the width of the app list boxes to 860 pixels
    
    Limited application list boxes on all pages: extras, installed,
    search results, and updates. Uses the newly introduced custom
    container GsFixedSizeBin and its "preferred-width" property.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758662
    
    Signed-off-by: Richard Hughes <richard hughsie com>

 src/gs-shell-extras.ui    |   28 +++++++++++++++++-----------
 src/gs-shell-installed.ui |   12 +++++++++---
 src/gs-shell-search.ui    |   13 ++++++++++---
 src/gs-shell-updates.ui   |   28 +++++++++++++++++-----------
 4 files changed, 53 insertions(+), 28 deletions(-)
---
diff --git a/src/gs-shell-extras.ui b/src/gs-shell-extras.ui
index b25a829..cf283ed 100644
--- a/src/gs-shell-extras.ui
+++ b/src/gs-shell-extras.ui
@@ -49,20 +49,26 @@
               <class name="main-scrolled-software"/>
             </style>
             <child>
-              <object class="GtkBox" id="box_results">
+              <object class="GsFixedSizeBin" id="gs_fixed_bin">
                 <property name="visible">True</property>
-                <property name="orientation">vertical</property>
+                <property name="preferred-width">860</property>
                 <child>
-                  <object class="GtkListBox" id="list_box_results">
+                  <object class="GtkBox" id="box_results">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="selection_mode">none</property>
-                  </object>
-                </child>
-                <child>
-                  <object class="GtkSeparator" id="separator_results">
-                    <property name="visible">True</property>
-                    <property name="orientation">horizontal</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkListBox" id="list_box_results">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="selection_mode">none</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkSeparator" id="separator_results">
+                        <property name="visible">True</property>
+                        <property name="orientation">horizontal</property>
+                      </object>
+                    </child>
                   </object>
                 </child>
               </object>
diff --git a/src/gs-shell-installed.ui b/src/gs-shell-installed.ui
index bb9ae42..3998c1c 100644
--- a/src/gs-shell-installed.ui
+++ b/src/gs-shell-installed.ui
@@ -40,10 +40,16 @@
                   <class name="main-scrolled-software"/>
                 </style>
                 <child>
-                  <object class="GtkListBox" id="list_box_install">
+                  <object class="GsFixedSizeBin" id="gs_fixed_bin">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="selection_mode">none</property>
+                    <property name="preferred-width">860</property>
+                    <child>
+                      <object class="GtkListBox" id="list_box_install">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="selection_mode">none</property>
+                      </object>
+                    </child>
                   </object>
                 </child>
               </object>
diff --git a/src/gs-shell-search.ui b/src/gs-shell-search.ui
index 5b99ef7..77e2267 100644
--- a/src/gs-shell-search.ui
+++ b/src/gs-shell-search.ui
@@ -79,10 +79,17 @@
               <class name="main-scrolled-software"/>
             </style>
             <child>
-              <object class="GtkListBox" id="list_box_search">
+              <object class="GsFixedSizeBin" id="gs_fixed_bin">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="selection_mode">none</property>
+                <property name="preferred-width">860</property>
+                <property name="valign">start</property>
+                <child>
+                  <object class="GtkListBox" id="list_box_search">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="selection_mode">none</property>
+                  </object>
+                </child>
               </object>
             </child>
           </object>
diff --git a/src/gs-shell-updates.ui b/src/gs-shell-updates.ui
index eed86e0..093e162 100644
--- a/src/gs-shell-updates.ui
+++ b/src/gs-shell-updates.ui
@@ -60,20 +60,26 @@
               <class name="main-scrolled-software"/>
             </style>
             <child>
-              <object class="GtkBox" id="list_box_updates_box">
+              <object class="GsFixedSizeBin" id="gs_fixed_bin">
                 <property name="visible">True</property>
-                <property name="orientation">vertical</property>
-                <child>
-                  <object class="GsUpdateList" id="list_box_updates">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="selection_mode">none</property>
-                  </object>
-                </child>
+                <property name="preferred-width">860</property>
                 <child>
-                  <object class="GtkSeparator" id="list_box_updates_separator">
+                  <object class="GtkBox" id="list_box_updates_box">
                     <property name="visible">True</property>
-                    <property name="orientation">horizontal</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GsUpdateList" id="list_box_updates">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="selection_mode">none</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkSeparator" id="list_box_updates_separator">
+                        <property name="visible">True</property>
+                        <property name="orientation">horizontal</property>
+                      </object>
+                    </child>
                   </object>
                 </child>
               </object>


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