Skip to content

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Dec 18, 2018

This PR makes app icon edge smoother in Ubuntu Bionic Dock and GNOME Activities Favorites (e.g., Fedora 29).

Ubuntu Bionic - BEFORE:
screenshot from 2018-12-18 07-17-31

Ubuntu Bionic - AFTER:
screenshot from 2018-12-18 07-15-43

Fedora 29 - BEFORE:
screenshot from 2018-12-18 07-31-02

Fedora 29 - AFTER:
screenshot from 2018-12-18 07-34-02

This makes app icon edge smoother in Ubuntu Bionic Dock and GNOME
Activities Favorites (e.g., Fedora 29).
@luke-jr
Copy link
Member

luke-jr commented Dec 18, 2018

Won't this make quality much worse for HiDPI stuff?

@hebasto
Copy link
Member Author

hebasto commented Dec 18, 2018

@luke-jr

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));
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonasschnelli

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.

Copy link
Member

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?

@fanquake fanquake added the GUI label Dec 18, 2018
@laanwj
Copy link
Member

laanwj commented Dec 18, 2018

BTW: a QIcon can contain multiple sizes, what about adding a 64x64 image and keeping the 256x256 one in?

@hebasto
Copy link
Member Author

hebasto commented Dec 18, 2018

@luke-jr @jonasschnelli @laanwj Thank you for your reviews.
Would you mind giving a piece of advice in #14992?

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants