[gnome-software/wip/jrocha/category-redesign: 1/4] Use popular tiles instead of summary tiles for the category view



commit 6ad281fa9ab3af9d321cd0fb97147014f60587e5
Author: Joaquim Rocha <jrocha endlessm com>
Date:   Fri Aug 11 23:10:15 2017 +0100

    Use popular tiles instead of summary tiles for the category view
    
    The popular tiles will be more compact and end up giving more emphasis
    to the featured apps at the top which use the summary tiles.

 src/gs-category-page.c  |    7 +++----
 src/gs-category-page.ui |    1 -
 2 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/gs-category-page.c b/src/gs-category-page.c
index 5da9c8b..419126b 100644
--- a/src/gs-category-page.c
+++ b/src/gs-category-page.c
@@ -28,6 +28,7 @@
 #include "gs-app-list-private.h"
 #include "gs-common.h"
 #include "gs-summary-tile.h"
+#include "gs-popular-tile.h"
 #include "gs-category-page.h"
 
 typedef enum {
@@ -146,7 +147,7 @@ gs_category_page_get_apps_cb (GObject *source_object,
 
        for (i = 0; i < gs_app_list_length (list); i++) {
                app = gs_app_list_index (list, i);
-               tile = gs_summary_tile_new (app);
+               tile = gs_popular_tile_new (app);
                g_signal_connect (tile, "clicked",
                                  G_CALLBACK (app_tile_clicked), self);
                gtk_container_add (GTK_CONTAINER (self->category_detail_box), tile);
@@ -271,7 +272,6 @@ gs_category_page_set_featured_apps (GsCategoryPage *self)
                                         "category", featured_subcat,
                                         "failure-flags", GS_PLUGIN_FAILURE_FLAGS_USE_EVENTS,
                                         "refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON |
-                                                        GS_PLUGIN_REFINE_FLAGS_REQUIRE_VERSION |
                                                         GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING,
                                         NULL);
        gs_plugin_loader_job_process_async (self->plugin_loader,
@@ -325,7 +325,7 @@ gs_category_page_reload (GsPage *page)
 
        count = MIN(30, gs_category_get_size (self->subcategory));
        for (i = 0; i < count; i++) {
-               tile = gs_summary_tile_new (NULL);
+               tile = gs_popular_tile_new (NULL);
                gtk_container_add (GTK_CONTAINER (self->category_detail_box), tile);
                gtk_widget_set_can_focus (gtk_widget_get_parent (tile), FALSE);
        }
@@ -336,7 +336,6 @@ gs_category_page_reload (GsPage *page)
                                         "category", self->subcategory,
                                         "failure-flags", GS_PLUGIN_FAILURE_FLAGS_USE_EVENTS,
                                         "refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON |
-                                                        GS_PLUGIN_REFINE_FLAGS_REQUIRE_VERSION |
                                                         GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING,
                                         NULL);
        gs_plugin_loader_job_process_async (self->plugin_loader,
diff --git a/src/gs-category-page.ui b/src/gs-category-page.ui
index 8c03a62..b05733f 100644
--- a/src/gs-category-page.ui
+++ b/src/gs-category-page.ui
@@ -286,7 +286,6 @@
                                 <property name="vexpand">True</property>
                                 <property name="valign">start</property>
                                 <property name="min-children-per-line">2</property>
-                                <property name="max-children-per-line">3</property>
                                 <property name="selection-mode">none</property>
                               </object>
                             </child>


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