Open arabine opened 2 years ago
Hi @arabine , thank you for reporting this. I think the issue is connected to the use of a special functional kind of icon, as explained below. I provide the following example for Gnome 3 Shell:
As you can see, the icon is set to "envelope" by the following lines of code:
#define TRAY_ICON1 "indicator-messages"
#define TRAY_ICON2 "indicator-messages-new"
My guess is that these two have no valid meaning in KDE and hence not respected, and tray icon is not shown at all.
I'd start by looking into how KDE encodes its special functional icons, such as notifications. A patch should offer a more portable way to use functional icons in different desktop environments.
Alternatively, you can specify a custom bitmap icon, and check whether it works in KDE (it should work out of the box). This could be a very useful test as well!
I tested with a standard icon name specified by the FreeDesktop and it works well on KDE: https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
eg:
#define TRAY_ICON1 "mail-message-new"
#define TRAY_ICON2 "mail-message-new"
I started a pull-request with multiple changes, including this topic.
Hi @arabine , thank you so much for working on this! I will review the PR #8 .
I discovered that you can use your own icon if you place an svg directly in /usr/share/icons
(I didn't test PNG, maybe that works as well). Only tested on Ubuntu. I tried using a subfolder, but it didn't work... maybe just need to define the icon differently in the code.
Then in your CMakeLists.txt
install(FILES "${CMAKE_SOURCE_DIR}/some-icon-name.svg" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons")
Is it possible to define the full path to the image instead of just some-icon-name
? I'd prefer to not install to that icon location if possible.
I also found this list of icons which are probably more universally supported. https://github.com/GNOME/gtk/blob/main/demos/icon-browser/icon.list
@ReenigneArcher , yes you are right, one way is to install icon into /usr/share/icons
. Another way is to embed icon into a binary, and hope that a desktop support its extraction - I don't think it's a popular choice at least due to performance reasons. Please propose a patch how do you envision icon customization in CMake.
Dear all,
After this discussion @Rjvs has replaced GNOME-specific bindings with Qt6, which has been merged into the master branch of tray now. I would like to know what do you think of his solution. Do you still prefer to keep this appindicator solution for legacy purposes, or can it be dropped in favor of Qt6?
Hello,
There is no tray icon visible on KDE. I don't know where to start but I can propose a patch if someone has some hints.