Commit 74ba2f37 authored by Erik Reider's avatar Erik Reider

Fix small SVGs being blurry in notifications

parent e498068e
...@@ -28,7 +28,12 @@ namespace SwayNotificationCenter { ...@@ -28,7 +28,12 @@ namespace SwayNotificationCenter {
try { try {
if (is_uri) uri = uri.slice (PREFIX_SIZE, uri.length); if (is_uri) uri = uri.slice (PREFIX_SIZE, uri.length);
var pixbuf = new Gdk.Pixbuf.from_file (uri); var pixbuf = new Gdk.Pixbuf.from_file_at_scale (
uri,
icon_size * img.scale_factor,
icon_size * img.scale_factor,
true);
// Scale and round the image. Scales to fit the size
var surface = scale_round_pixbuf (pixbuf, var surface = scale_round_pixbuf (pixbuf,
icon_size, icon_size,
icon_size, icon_size,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment