Avoid downscaling search result icon
Summary
A search result icon was scaled down 2x during pixbuf export, while being rendered at 48px. This caused noticeable blurriness in shell search results under 2x display scaling. This commit prevents the downscaling.
Comparisons
Environment:
- gnome-shell 42.2
- gnome-characters 42.0
- single monitor, resolution 2256 x 1504
Before @ 2x scaling:
After @ 2x scaling:
Before @ 1x scaling:
After @ 1x scaling:
Questions
-
I suppose that ideally we need the shell to tell characters application which size it expects the icon will be. Is that right? Currently there does not seem to be a way the shell to tell that over
ShellSearchProvider2
interface. -
This 48px icon size is currently hardcoded. I wonder what's the rationale behind choosing it?
-
This blurriness will probably manifest again at 3x scaling or more. Should I do something about it? I was wondering if it would be feasible to find out scaling factor of the monitor the shell resides on and pick icon size depending on this factor. Though this starts to sound like a hack.