Give search and notifications consistent row layouts

The search and notification panels have similar list rows,
as they both list applications. This gives the list rows more
consistent layouts - application icons are made to be 32px
throughout and row heights are made to be the same.

Note that the row widths are unfortunately still different.

https://bugzilla.gnome.org/show_bug.cgi?id=786384
This commit is contained in:
Allan Day 2017-08-17 12:49:18 +01:00 committed by Rui Matos
parent a9bf8b5b04
commit c7fea8894f
2 changed files with 6 additions and 8 deletions

View file

@ -314,7 +314,8 @@ add_application (CcNotificationsPanel *panel,
else
g_object_ref (icon);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_container_set_border_width (GTK_CONTAINER (box), 10);
row = gtk_list_box_row_new ();
g_object_set_qdata_full (G_OBJECT (row), application_quark (),
@ -329,9 +330,6 @@ add_application (CcNotificationsPanel *panel,
w = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_DIALOG);
gtk_icon_size_lookup (GTK_ICON_SIZE_DND, &size, NULL);
gtk_image_set_pixel_size (GTK_IMAGE (w), size);
gtk_widget_set_margin_start (w, 12);
gtk_widget_set_margin_top (w, 8);
gtk_widget_set_margin_bottom (w, 8);
gtk_size_group_add_widget (GTK_SIZE_GROUP (gtk_builder_get_object (panel->builder, "sizegroup1")), w);
gtk_container_add (GTK_CONTAINER (box), w);
g_object_unref (icon);

View file

@ -449,10 +449,10 @@ search_panel_add_one_app_info (CcSearchPanel *self,
gtk_widget_set_valign (self->priv->list_box, GTK_ALIGN_FILL);
row = gtk_list_box_row_new ();
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_container_add (GTK_CONTAINER (row), box);
gtk_widget_set_hexpand (box, TRUE);
gtk_container_set_border_width (GTK_CONTAINER (box), 6);
gtk_container_set_border_width (GTK_CONTAINER (box), 10);
g_object_set_data_full (G_OBJECT (row), "app-info",
g_object_ref (app_info), g_object_unref);
g_object_set_data (G_OBJECT (row), "self", self);
@ -464,8 +464,8 @@ search_panel_add_one_app_info (CcSearchPanel *self,
else
g_object_ref (icon);
w = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_DIALOG);
gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &width, &height);
w = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_DND);
gtk_icon_size_lookup (GTK_ICON_SIZE_DND, &width, &height);
gtk_image_set_pixel_size (GTK_IMAGE (w), MAX (width, height));
gtk_container_add (GTK_CONTAINER (box), w);
g_object_unref (icon);