gtk-demo: Fix iconscroll colors

We changed the way the color grid works.
Adapt the iconscroll use of it.

Fixes: #3030
This commit is contained in:
Matthias Clasen 2020-08-08 14:36:16 -04:00
parent dbbc9b5c58
commit 57a213a4ea
2 changed files with 7 additions and 1 deletions

View File

@ -153,14 +153,20 @@ populate_list (void)
}
extern GtkWidget *create_color_grid (void);
extern GListModel *gtk_color_list_new (guint size);
static void
populate_grid (void)
{
GtkWidget *list;
GtkNoSelection *selection;
list = create_color_grid ();
selection = gtk_no_selection_new (gtk_color_list_new (2097152));
gtk_grid_view_set_model (GTK_GRID_VIEW (list), G_LIST_MODEL (selection));
g_object_unref (selection);
hincrement = 0;
vincrement = 5;

View File

@ -523,7 +523,7 @@ gtk_color_list_init (GtkColorList *self)
g_bytes_unref (data);
}
static GListModel *
GListModel *
gtk_color_list_new (guint size)
{
return g_object_new (GTK_TYPE_COLOR_LIST,