-
Notifications
You must be signed in to change notification settings - Fork 38.7k
qt: Use bilinear filtering for icon #14990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This makes app icon edge smoother in Ubuntu Bionic Dock and GNOME Activities Favorites (e.g., Fedora 29).
|
Won't this make quality much worse for HiDPI stuff? |
I cannot check myself. |
| appIcon = QIcon(pixmap); | ||
| trayAndWindowIcon = QIcon(pixmap.scaled(QSize(256,256))); | ||
| appIcon = QIcon(pixmap); | ||
| trayAndWindowIcon = QIcon(pixmap.scaled(QSize(64, 64), Qt::KeepAspectRatio, Qt::SmoothTransformation)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would keeping the size of 256x256 (for all current and future HiDPI-ish situations) change the results?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would keeping the size of 256x256 (for all current and future HiDPI-ish situations) change the results?
Unfortunately, for unknown for me reasons, 64x64 is the maximum size for which Qt::SmoothTransformation works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea I'd say NACK on going back to 64x64 here, this makes assumptions about the size that the OS will use, and 256x256 has been more or less the default for OSX for a while. It's up to the OS to scale this image down.
Scaling to 256x256 likely has no effect because the input image is 256x256?
|
BTW: a QIcon can contain multiple sizes, what about adding a 64x64 image and keeping the 256x256 one in? |
|
@luke-jr @jonasschnelli @laanwj Thank you for your reviews. |
This PR makes app icon edge smoother in Ubuntu Bionic Dock and GNOME Activities Favorites (e.g., Fedora 29).
Ubuntu Bionic - BEFORE:

Ubuntu Bionic - AFTER:

Fedora 29 - BEFORE:

Fedora 29 - AFTER:
