[gnome-software: 9/13] gs-overview-page: Move the categories to under the carousel




commit edcf16ccf6e9ebac468e975c413c5df736e1b724
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu Jul 29 17:04:04 2021 +0100

    gs-overview-page: Move the categories to under the carousel
    
    This gets the page layout a lot closer to the new design. More work is
    needed to split out the highlighted categories (Play and Work), but this
    is a big improvement for making the categories discoverable.
    
    https://gitlab.gnome.org/Teams/Design/software-mockups/-/blob/master/adaptive/sidebarless.png
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 src/gs-overview-page.c  |  3 ---
 src/gs-overview-page.ui | 43 +++++++++++++------------------------------
 2 files changed, 13 insertions(+), 33 deletions(-)
---
diff --git a/src/gs-overview-page.c b/src/gs-overview-page.c
index 3bee17d9e..863de4bb9 100644
--- a/src/gs-overview-page.c
+++ b/src/gs-overview-page.c
@@ -48,7 +48,6 @@ struct _GsOverviewPage
        GtkWidget               *box_overview;
        GtkWidget               *box_popular;
        GtkWidget               *box_recent;
-       GtkWidget               *category_heading;
        GtkWidget               *flowbox_categories;
        GtkWidget               *popular_heading;
        GtkWidget               *recent_heading;
@@ -346,7 +345,6 @@ gs_overview_page_get_categories_cb (GObject *source_object,
 out:
        if (added_cnt > 0)
                self->empty = FALSE;
-       gtk_widget_set_visible (self->category_heading, added_cnt > 0);
 
        gs_overview_page_decrement_action_cnt (self);
 }
@@ -731,7 +729,6 @@ gs_overview_page_class_init (GsOverviewPageClass *klass)
        gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, box_overview);
        gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, box_popular);
        gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, box_recent);
-       gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, category_heading);
        gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, flowbox_categories);
        gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, popular_heading);
        gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, recent_heading);
diff --git a/src/gs-overview-page.ui b/src/gs-overview-page.ui
index 6a574dcbc..b5df4c0d2 100644
--- a/src/gs-overview-page.ui
+++ b/src/gs-overview-page.ui
@@ -90,6 +90,19 @@
                               </object>
                             </child>
 
+                            <child>
+                              <object class="GtkFlowBox" id="flowbox_categories">
+                                <property name="visible">True</property>
+                                <property name="margin-top">21</property>
+                                <property name="margin-bottom">6</property>
+                                <property name="row_spacing">14</property>
+                                <property name="column_spacing">14</property>
+                                <property name="homogeneous">True</property>
+                                <property name="max_children_per_line">3</property>
+                                <property name="selection_mode">none</property>
+                              </object>
+                            </child>
+
                             <child>
                               <object class="GtkLabel" id="popular_heading">
                                 <property name="visible">True</property>
@@ -146,36 +159,6 @@
                                 </accessibility>
                               </object>
                             </child>
-
-                            <child>
-                              <object class="GtkLabel" id="category_heading">
-                                <property name="visible">True</property>
-                                <property name="xalign">0</property>
-                                <property name="label" translatable="yes">Categories</property>
-                                <property name="margin-top">24</property>
-                                <property name="margin-bottom">6</property>
-                                <accessibility>
-                                  <relation target="flowbox_categories" type="label-for"/>
-                                </accessibility>
-                                <style>
-                                  <class name="index-title-alignment-software"/>
-                                </style>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkFlowBox" id="flowbox_categories">
-                                <property name="visible">True</property>
-                                <property name="margin-bottom">6</property>
-                                <property name="row_spacing">14</property>
-                                <property name="column_spacing">14</property>
-                                <property name="homogeneous">True</property>
-                                <property name="max_children_per_line">3</property>
-                                <property name="selection_mode">none</property>
-                                <accessibility>
-                                  <relation target="category_heading" type="labelled-by"/>
-                                </accessibility>
-                              </object>
-                            </child>
                           </object>
                         </child>
                       </object>


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