Closed jinliu closed 8 months ago
Because jouno isn't a KDE application, I don't think I have a way to automatically achieve this. What I could do is bring over some code from vdu_controls issue #66 which would introduce settings that switch a monochrome panel icon and a second switch for light-on-dark or dark-on-light:
Pushed f9c8bfa which adds a dark-tray setting, as can be seen here with the Breeze Twilight theme:
I've looked for methods on QSystemTrayIcon which could provide a way to find out if the tray is dark. There don't appear to be any. I noticed that the tooltip text is themed, but there is no method to get at the palette or font used. There is also no method to obtain any style information.
I also looked app.stylesheet(), but that returns an empty string.
So I'm kind of stuck for how to achieve this without a manual setting.
Thank you very much!
https://github.com/nextcloud/desktop has a tray icon that adapts to the tray color. But seems it's using KDE's built-in cloudstatus
icon, and I can't find the reference to that icon in the source code, so that might not help.
Thank you very much!
https://github.com/nextcloud/desktop has a tray icon that adapts to the tray color. But seems it's using KDE's built-in
cloudstatus
icon, and I can't find the reference to that icon in the source code, so that might not help.
Unless it's pure Qt or accessable from Qt calls I probably can't use it. It would be best if it worked for gnome, deepin and the rest.
Having one extra setting isn't a big deal, that will have to do.
In theory, this could be done by using a
current-color-scheme
CSS in SVG_JOUNO, as in SVG_TOOLBAR_RUN_DISABLED and others. But adding that makes the icon invisible.