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
1=== modified file 'plugins/notify/NotifyServer.vala'
2--- plugins/notify/NotifyServer.vala 2015-03-12 14:15:47 +0000
3+++ plugins/notify/NotifyServer.vala 2015-05-26 09:45:05 +0000
4@@ -333,8 +333,13 @@
5 try {
6 var themed = new ThemedIcon.with_default_fallbacks (app_icon);
7 var info = Gtk.IconTheme.get_default ().lookup_by_gicon (themed, size, 0);
8- if (info != null)
9+ if (info != null) {
10 pixbuf = info.load_icon ();
11+
12+ if (pixbuf.heiht != size)
13+ pixbuf = pixbuf.scale_simple (size, size, Gdk.InterpType.HYPER);
14+
15+ }
16 } catch (Error e) { warning (e.message); }
17
18 }

Subscribers

People subscribed via source and target branches