qt: Use bilinear filtering for icon #14990

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:20181218-icon-bilinear-filtering changing 1 files +2 −2
  1. hebasto commented at 5:55 AM on December 18, 2018: member

    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

  2. Use bilinear filtering for icon
    This makes app icon edge smoother in Ubuntu Bionic Dock and GNOME
    Activities Favorites (e.g., Fedora 29).
    2e5b8cabbf
  3. luke-jr commented at 5:57 AM on December 18, 2018: member

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

  4. hebasto commented at 5:59 AM on December 18, 2018: member

    @luke-jr

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

    I cannot check myself.

  5. in src/qt/networkstyle.cpp:75 in 2e5b8cabbf
      70 | @@ -71,8 +71,8 @@ NetworkStyle::NetworkStyle(const QString &_appName, const int iconColorHueShift,
      71 |          pixmap.convertFromImage(img);
      72 |      }
      73 |  
      74 | -    appIcon             = QIcon(pixmap);
      75 | -    trayAndWindowIcon   = QIcon(pixmap.scaled(QSize(256,256)));
      76 | +    appIcon = QIcon(pixmap);
      77 | +    trayAndWindowIcon = QIcon(pixmap.scaled(QSize(64, 64), Qt::KeepAspectRatio, Qt::SmoothTransformation));
    


    jonasschnelli commented at 6:11 AM on December 18, 2018:

    Would keeping the size of 256x256 (for all current and future HiDPI-ish situations) change the results?


    hebasto commented at 6:29 AM on December 18, 2018:

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


    laanwj commented at 7:47 AM on December 18, 2018:

    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?

  6. fanquake added the label GUI on Dec 18, 2018
  7. laanwj commented at 7:48 AM on December 18, 2018: member

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

  8. hebasto closed this on Dec 18, 2018

  9. hebasto commented at 10:09 AM on December 18, 2018: member

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

  10. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me