Skip to content

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:

Screenshot_from_2022-06-24_13-00-49

After @ 2x scaling:

Screenshot_from_2022-06-24_13-05-29

Before @ 1x scaling:

Screenshot_from_2022-06-24_13-03-30

After @ 1x scaling:

Screenshot_from_2022-06-24_13-04-44

Questions

  1. 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.

  2. This 48px icon size is currently hardcoded. I wonder what's the rationale behind choosing it?

  3. 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.

Merge request reports