ironbar
ironbar copied to clipboard
Force scaling icon
fix https://github.com/JakeStanger/ironbar/issues/809
this make sure that all the icon's height are the same. but some might considered "ok" size before may seem a bit off than usual:
BEFORE:
AFTER:
But we can change the icon size ourself (used to be 16, now 24):
So this is just one way of fixing the problem i can close this if it's not a proper solution.
and also, should we find a proper size in pixmap function instead of just use the first one? https://github.com/JakeStanger/ironbar/blob/8a06ec04b098d662188426d7eaf0e9d108725cc5/src/modules/tray/icon.rs#L90
or since we have re-scale as post-process, we can just choose the largest one.
Thanks for this, haven't given a full review yet but looks good.
I think it would make sense to pick the next biggest size and scale that down. That'd be cheaper than always scaling the largest.
I think it would make sense to pick the next biggest size and scale that down.
i've added the functionality for this if i understand correctly.
One thing bothering me is that, whether the Vec<IconPixmap> is sorted with height, if so then we can use a better way to speed up the search.
One thing bothering me is that, whether the Vec<IconPixmap> is sorted with height, if so then we can use a better way to speed up the search.
The spec is so incredibly vague and has so many incorrect implementations that I'd keep away from trying to do anything like that. The good news is in reality there will only be a few entries on rare occasions so the search will be fast enough always.