Merge lp:~voldyman/gala/scale-large-notification-icon into lp:gala

Proposed by Akshay Shekher
Status: Merged
Merged at revision: 465
Proposed branch: lp:~voldyman/gala/scale-large-notification-icon
Merge into: lp:gala
Diff against target: 18 lines (+6/-1)
1 file modified
plugins/notify/NotifyServer.vala (+6/-1)
To merge this branch: bzr merge lp:~voldyman/gala/scale-large-notification-icon
Reviewer Review Type Date Requested Status
Rico Tzschichholz Approve
Review via email: mp+259312@code.launchpad.net

Description of the change

Check if the loaded icon is of the required size, if not scale it.

To post a comment you must log in.
Revision history for this message
Rico Tzschichholz (ricotz) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/notify/NotifyServer.vala'
--- plugins/notify/NotifyServer.vala 2015-03-12 14:15:47 +0000
+++ plugins/notify/NotifyServer.vala 2015-05-26 09:45:05 +0000
@@ -333,8 +333,13 @@
333 try {333 try {
334 var themed = new ThemedIcon.with_default_fallbacks (app_icon);334 var themed = new ThemedIcon.with_default_fallbacks (app_icon);
335 var info = Gtk.IconTheme.get_default ().lookup_by_gicon (themed, size, 0);335 var info = Gtk.IconTheme.get_default ().lookup_by_gicon (themed, size, 0);
336 if (info != null)336 if (info != null) {
337 pixbuf = info.load_icon ();337 pixbuf = info.load_icon ();
338
339 if (pixbuf.heiht != size)
340 pixbuf = pixbuf.scale_simple (size, size, Gdk.InterpType.HYPER);
341
342 }
338 } catch (Error e) { warning (e.message); }343 } catch (Error e) { warning (e.message); }
339344
340 }345 }

Subscribers

People subscribed via source and target branches