Use icons from the system icon theme where possible #1222

issue ssokolow opened this issue on May 8, 2012
  1. ssokolow commented at 10:37 AM on May 8, 2012: none

    Currently, the icons in the BitCoin wallet stick out like sore thumbs on the vast majority of Linux desktops. (Probably looking the least out of place on KDE-based desktops, given the design aesthetic.)

    The QIcon initializers in BitcoinGUI::createActions() in src/qt/bitcoingui.cpp should be changed to use QIcon::fromTheme instead.

    Also, the icons in :/icons/ should be renamed to match the XDG icon-naming spec so the fallback behaviour is preserved without needing to provide the optional second parameter to fromTheme.

    For example:

    • QIcon(":/icons/filesave") should become QIcon::fromTheme("document-save")
    • QIcon(":/icons/quit") should become QIcon::fromTheme("application-exit")
    • QIcon(":/icons/address-book") should become QIcon::fromTheme("x-office-address-book")
    • document-properties would be a good standard replacement for :/icons/options
    • You can get away with using go-next and go-down to replace :/icons/send and :/icons/receiving_addresses

    Ideally, you'll want to install any icons not covered by the icon-naming spec in the appropriate size and category subfolders of the fallback theme at $PREFIX/share/icons/hicolor/ where it's easy for theme authors to look up the names to override.

    Here's all the relevant documentation:

  2. Diapolo commented at 5:47 PM on May 8, 2012: none

    From the Qt Creator help: Note: By default, only X11 will support themed icons. In order to use themed icons on Mac and Windows, you will have to bundle a compliant theme in one of your themeSearchPaths() and set the appropriate themeName().

    I consider your suggestion a bad solution for a perhaps good idea ^^.

  3. ssokolow commented at 5:52 PM on May 8, 2012: none

    From the QIcon::themeSearchPaths documentation:

    By default all platforms will have the resource directory :\icons as a fallback.

    Hence why I said you could rename the icons you're already using to match the names in the XDG icon-naming spec.

    It's also possible to do this, though it's adds unnecessary verbosity:

    QIcon::fromTheme("document-save", QIcon(":/icons/filesave"))
    
  4. laanwj commented at 8:26 AM on May 9, 2012: member

    The only problem I see here is one of consistency. For example, the tab icons need to fit together. Currently they are all blue-ish to be in the same style. I wouldn't mind them being simplified even more, like Android tab icons. So don't do this to the tab icons (overview, history, address-book, receiving_addresses, send). If it picked one or two from the theme it'd look weird.

    For the other generic button/menu icons such as "quit" "options" "save", go ahead use the theme if available.

  5. ssokolow commented at 10:48 AM on May 9, 2012: none

    The toolbar icons are actually the ones that jump out the most as inconsistent with the rest of the desktop (and, given how variable the system theme can be just as a function of distro defaults, I don't think that can truly be fixed by a bundled icon set.)

    Would this be an appropriate solution for you?

    1. I complete the set of themable toolbar icons by looking up icon names for overview and history that give proper results in, at minimum, these icon themes:
      • GNOME 3 default
      • Humanity (Ubuntu default)
      • Oxygen (KDE default)
      • Elementary (Lubuntu default and popular alternative)
      • Faenza (popular alternative)
      • Tango (popular alternative and recommended fallback style)
      • All of the themes which inherit from the above to cover their gaps
    2. You use icons that are either from or in the style of Tango for the fallback. (Tango was specifically designed to be the best stylistic middle-ground possible so it could be used for embedded resources and fallback icons in cross-platform applications.)

    It's also generally accepted by theme users and authors that, if they design a theme that is truly at odds with Tango (primarily by using a very different color scheme) and doesn't inherit from one of the other major themes, then they share responsibility in any consistency failures.

  6. Diapolo commented at 10:50 AM on May 9, 2012: none

    @ssokolow I can't comment on your suggestion, but perhaps you can explain how and if this will affect Windows users as there are quite many of them using Bitcoin-Qt.

  7. laanwj commented at 11:00 AM on May 9, 2012: member

    It will not affect Windows or Mac users. Period. This is a linux-only party :p

  8. laanwj commented at 11:05 AM on May 9, 2012: member

    @ssokolow yes, that's fine, just send a list with the icon names, and maybe examples how they look in various default themes, so we can see that they provide consistent tab icons

  9. ssokolow commented at 11:10 AM on May 9, 2012: none

    Ok. I've got exams coming up, so I can't guarantee a time-frame, but I'll try to have it done within a week. (Failing that, I'm free in June)

    Since it'd probably be the simplest way to test and fine-tune, I may just patch it myself and offer up the screenshots and list in a pull request.

  10. laanwj commented at 8:52 AM on August 18, 2012: member

    Any progress on this?

  11. laanwj commented at 9:37 AM on March 29, 2013: member

    Too long without reply, closing this issue. This doesn't mean I'm not still interested, let me know if you're still working on this (or planning to).

  12. laanwj closed this on Mar 29, 2013

  13. ssokolow commented at 6:05 AM on March 11, 2014: none

    Sorry about going out of contact. For quite a while, I wasn't receiving notifications because something silently went wrong with my GitHub e-mail setup.

    I only rediscovered this by accident and now's a bad time, but I'll put it on my primary TODO list and see when I can fit it in.

  14. lateminer referenced this in commit b106c1de5d on Jan 22, 2019
  15. lateminer referenced this in commit 69f897be35 on Dec 25, 2019
  16. 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:16 UTC

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