We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9c8d086 + 569f40d commit b9cd51aCopy full SHA for b9cd51a
src/modules/sni/item.cpp
@@ -265,7 +265,11 @@ void Item::updateImage() {
265
if (pixbuf->gobj() != nullptr) {
266
// An icon specified by path and filename may be the wrong size for
267
// the tray
268
- pixbuf = pixbuf->scale_simple(icon_size, icon_size, Gdk::InterpType::INTERP_BILINEAR);
+ // Keep the aspect ratio and scale to make the height equal to icon_size
269
+ // If people have non square icons, assume they want it to grow in width not height
270
+ int width = icon_size * pixbuf->get_width() / pixbuf->get_height();
271
+
272
+ pixbuf = pixbuf->scale_simple(width, icon_size, Gdk::InterpType::INTERP_BILINEAR);
273
image.set(pixbuf);
274
}
275
} else {
0 commit comments