On HiDPI (280dpi) displays icons embedded in notifications are sometimes too small to see, so an option to set the minimum image/icon size (e.g. upscale image if too small) would be appreciated.
There is an option to downscale an icon but upscaling would have some serious quality issues. Is there a reason why you're not using a higher resolution icon pack?
Yes I am entirely aware of this :)
But I'm talking about icons embedded in notifications originating from web sites which I am not in control of. The images look fine on 100dpi displays. Upscaling won't make them look much worse than that I suppose. Now it's hard to recognize the images (people's faces mostly) when they are only ~2mm (0.1in) big on the display, so just seeing them bigger even if they would be a bit blurry would actually help.
The default could be set to 0 so no upscaling would occur unless the user really wants it.
I could even give a shot at implementing this if you don't mind?
It ended up being quite simple; see PR #393. Works for me :) And it really helps.
I'm not a user of a HiDPI screen. Can somebody explain me this situation?
I see and understand, why the image gets too small, when using higher DPIs and your software is not DPI-aware. But if I understand correctly, dunst should be DPI-aware (#240). So, why does the icon get displayed too small? Shouldn't be the best fix to scale the icon DPI-aware, too?
hmm.. I'm actually using an older snapshot from this summer because the xrandr library in devuan is a bit old. I failed to realize there was dpi stuff taking care of this in latest version so I took my own approach instead. So maybe we can close this for now and reopen later if there is still need. Sorry for the disturbance.
@xkr47 Just because I say dunst should be DPI-aware, doesn't make dunst automatically fully DPI-aware.
There may be some bugs. Are you sure, that dunst scales now the icon correct?
It would still be nice to have min_icon_size for icon themes consisting solely of SVG images (such as https://github.com/daniruiz/flat-remix).
This would be a fantastic feature for SVG as so many laptops have higher resolutions now. Dunst renders svg icons very small and I can't find a way to make them larger.
@nikarh @ShawnMcCool,
I got my branch (which I still use) updated to the latest master a few days ago, but I haven't really tested the DPI based proposals suggested here. Here's the current version for those that want it.. https://github.com/xkr47/dunst/commit/16fc3b2fde604482eba8b6c6dc3c320960595399
@xkr47 I'm not sure at what size gdk loads svgs by default but from what you're doing there might be quality loss when upscaling the loaded svg since it's converted to bitmap.
If you'd like to prepare it for a proper PR/merge then you can use gdk_pixbuf_new_from_file_at_scale in get_pixbuf_from_icon to handle min_icon_size and keep the existing downscaling code as-is.
Wouldn't it make sense to do both up & downscaling using that method then? Also great idea, thanks!
Ok looking at the code I see I misunderstood your point a bit.. but icon_pixbuf_scale() is used also from notification_icon_replace_data() when image pixels are embedded in the notification message, like spotify for example does with music album images. In this case up & downscaling is still needed.
So I think the best result would be keeping my code and also use the gdk_pixbuf_new_from_file_at_scale() you suggested, in which case my min_size logic should just have no effect..
I forgot about that detail, you're right.
So I think the best result would be keeping my code and also use the gdk_pixbuf_new_from_file_at_scale() you suggested, in which case my min_size logic should just have no effect..
This sounds good to me, if you can add that and submit a PR I'll merge it.
@nikarh @ShawnMcCool this feature is now merged to master! Look out for the next release for some scaling goodness! :)
min_icon_size option.Hey thanks so much.
On Wed, Dec 18, 2019 at 3:12 PM Jonas Berlin notifications@github.com
wrote:
@nikarh https://github.com/nikarh @ShawnMcCool
https://github.com/ShawnMcCool this feature is now merged to master!
Look out for the next release for some scaling goodness! :)—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dunst-project/dunst/issues/392?email_source=notifications&email_token=AAEI43MPHLWMBB2S2F47HGLQZIVTDA5CNFSM4D4VFON2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHGHOHY#issuecomment-567047967,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEI43NQRTP7KRG7H7XZK73QZIVTDANCNFSM4D4VFONQ
.
Most helpful comment
It would still be nice to have min_icon_size for icon themes consisting solely of SVG images (such as https://github.com/daniruiz/flat-remix).