[gnome-control-center] Give search and notifications consistent row layouts
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Give search and notifications consistent row layouts
- Date: Sun, 20 Aug 2017 16:40:31 +0000 (UTC)
commit c7fea8894ff9bbe1391e16308438b81ed8e22c0d
Author: Allan Day <allanpday gmail com>
Date: Thu Aug 17 12:49:18 2017 +0100
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
panels/notifications/cc-notifications-panel.c | 6 ++----
panels/search/cc-search-panel.c | 8 ++++----
2 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/panels/notifications/cc-notifications-panel.c b/panels/notifications/cc-notifications-panel.c
index 8cadb99..89e33e1 100644
--- a/panels/notifications/cc-notifications-panel.c
+++ b/panels/notifications/cc-notifications-panel.c
@@ -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);
diff --git a/panels/search/cc-search-panel.c b/panels/search/cc-search-panel.c
index 8e60044..67e7225 100644
--- a/panels/search/cc-search-panel.c
+++ b/panels/search/cc-search-panel.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]