[gnome-control-center] notifications: Force smaller icons



commit db756d7b58aa6cd6d64087640b6b20ea31f73878
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Jan 5 15:25:48 2015 +0100

    notifications: Force smaller icons
    
    To work-around application icons that would be too big.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742116

 panels/notifications/cc-notifications-panel.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/panels/notifications/cc-notifications-panel.c b/panels/notifications/cc-notifications-panel.c
index 7d3adfd..4568e7e 100644
--- a/panels/notifications/cc-notifications-panel.c
+++ b/panels/notifications/cc-notifications-panel.c
@@ -193,6 +193,7 @@ add_application (CcNotificationsPanel *panel,
 {
   GtkWidget *box, *w, *row;
   GIcon *icon;
+  int size;
 
   icon = g_app_info_get_icon (app->app_info);
   if (icon == NULL)
@@ -210,6 +211,8 @@ add_application (CcNotificationsPanel *panel,
   gtk_container_add (GTK_CONTAINER (row), box);
 
   w = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_DIALOG);
+  gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &size, NULL);
+  gtk_image_set_pixel_size (GTK_IMAGE (w), size);
   gtk_widget_set_margin_start (w, 12);
   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]