SwayNotificationCenter icon indicating copy to clipboard operation
SwayNotificationCenter copied to clipboard

[Feature] Image fitting

Open abdulrahim-ss opened this issue 6 months ago • 0 comments

I am trying to create a notification popup for when I take a screenshot to ask whether I want to save it or not. I am trying to show the image in a preview, and so far I succeeded to do so by adding an HTML image tag in the body of the notification. <img src="/tmp/temp_screenshot.png">. When using GTK_DEBUG=interactive swaync, it appears that the image is actually converted to a GTK object picture. It has a property called content-fit or GtkContentFit that works exactly like CSS' object-fit. This is neither exposed in style.css or config.json. I noticed that swaync exposes the width and height via the notification-body-image-height and notification-body-image-width properties. I would very much like for more properties to be exposed this way. Thank you!

abdulrahim-ss avatar Oct 19 '25 20:10 abdulrahim-ss