The logo icon doesn’t show properly under Wayland #781

issue sinetek openend this issue on December 10, 2023
  1. sinetek commented at 8:15 pm on December 10, 2023: contributor

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    There should be a bitcoin logo icon when running the application under a wayland session. Right now it looks like this on my machine. This should be fixed, because it looks like it’s running W-coin or some altcoin and that could be confusing, and/or misleading.

    image

    Expected behaviour

    It should look like this (run on the same machine, same everything, but with platform xcb):

    image

    Steps to reproduce

    Compile and run normally.

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    master

    Operating system and version

    Debian 12 (bookworm) with KDE Plasma (Wayland)

    Machine specifications

    image

  2. willcl-ark commented at 11:02 am on December 11, 2023: contributor

    I think Wayland is much stricter about loading the icon from the .desktop file (which must have an exactly matching name). I didn’t test this any further, but running Wayland on my system with an appropriate .desktop file installed I do get the correct icon:

    Screenshot from 2023-12-10 20-36-06

    That said, I added my .desktop file manually a while ago, and I notice now that on my machine the code which appears to write the .desktop file is not being included in the compilation, after being exluded by the C preprocessor. Specifically Q_OS_LINUX does not appear to have been set by ./configure, so the code following this is skipped:

    https://github.com/bitcoin/bitcoin/blob/36fabb01b16c70902c085187b0a6978c70c691c0/src/qt/guiutil.cpp#L574 This seems problematic to me, oir at least, I don’t understand why on Linux this code is being excluded by the CPP.

    Did you try installing with sudo make install, or are you just running the binary as built by make? If you didn’t install, you could try running sudo make install; bitcoin-qt and see if the installed version references the correct icon? (Note this will overwrite any previously-installed version).

    I’ve not worked on the GUI or QT much, so will defer to others here. For reference, my .desktop file in /usr/local/share/applications is in the form:

    0will@ubuntu /u/s/applications $ cat Bitcoin-qt.desktop
    1[Desktop Entry]
    2Name=Bitcoin-Qt
    3Exec=/usr/local/bin/bitcoin-qt
    4Icon=/home/will/src/bitcoin/share/pixmaps/bitcoin64.png
    5Type=Application
    6Categories=Utility;
    
  3. sinetek commented at 10:24 pm on December 11, 2023: contributor

    it sohuld be simpler than that, something like QWindow::setIcon() ought to be enough ?


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 09:20 UTC

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