Skip to content

Commit

Permalink
Fix small SVGs being blurry in notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikReider committed Dec 20, 2023
1 parent e498068 commit 74ba2f3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/functions.vala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ namespace SwayNotificationCenter {
try {
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,
icon_size,
icon_size,
Expand Down

0 comments on commit 74ba2f3

Please sign in to comment.