hwittenborn / celeste

GUI file synchronization client that can sync with any cloud provider
GNU General Public License v3.0
1.23k stars 41 forks source link

add dark mode tray icon for plasma desktop #56

Open tazihad opened 1 year ago

tazihad commented 1 year ago

icon color isn't right for plasma desktop. Screenshot_20230221_111213

elydpg commented 1 year ago

Hmm on my machine running kubuntu 23.10 all I see is a black box; no icon at all even

Screenshot_20231113_181710

hwittenborn commented 1 year ago

The icon @tazihad is referring to is Celeste's old icon @elydpg. There was a point where even the old icon had a black box on Plasma iirc, and I guess the behavior got introduced again somehow. I'll look into the SVG files that are used there and see what I can find.

wokawoka commented 11 months ago

Hmm on my machine running kubuntu 23.10 all I see is a black box; no icon at all even

Screenshot_20231113_181710

I'm experiencing the same issue on kubuntu 22.04

kuunha commented 11 months ago

The black box issue seems to be with Qt SVG, used by KDE Plasma for displaying SVG.

According to https://doc.qt.io/qt-5/svgrendering.html:

Qt supports the static features of SVG 1.2 Tiny. ECMA scripts and DOM manipulation are currently not supported.

Exporting the files with BoxySVG fixed the problem: Screenshot_20231221_124818 To make SVGs adapt to your system colors, you can follow this: https://develop.kde.org/docs/plasma/theme/theme-colors/ Screenshot_20231221_125231 Screenshot_20231221_142110

If someone wants to try it, just put these SVG files in ~/.local/share/icons/hicolor/symbolic/apps/ com.hunterwittenborn.Celeste.CelesteTrayLoading-symbolic.svg com.hunterwittenborn.Celeste.CelesteTraySyncing-symbolic.svg com.hunterwittenborn.Celeste.CelesteTrayWarning-symbolic.svg com.hunterwittenborn.Celeste.CelesteTrayDone-symbolic.svg

Clean the icon cache (~/.cache/icon-cache.kcache) and login again.

Tray icon should follow your system colors

hwittenborn commented 11 months ago

Hey @kturques, thanks for finding a fix! I don't think the issue is solely with QT's SVG engine, I'm pretty sure the current icons are just not adhering to some spec for tray icons as well (that was the issue with Celeste's previous tray icons at least).

I'm pretty sure https://github.com/hwittenborn/celeste/blob/develop/assets/celeste-symbolics-source.svg needs to be fixed (I guess just by running it through that program you used), and then all the icons should be able to just be re-exported and ready to go. If you know the workflow for that feel free to get it done, otherwise I'll try to tackle it soon.

Retrograde-i486 commented 8 months ago

I'm getting the same black box tray icon for Celeste as a few others are. Running KDE Plasma 6 on wayland on Arch Linux. I tried the fix that @kuunha mentioned but I didn't even have a /symbolic/apps folder under .local/share/icons/hicolor. I created that, added the files and cleared the icon cache but still seeing a black box. I installed via flatpak so maybe that's why? 2024-04-01_13-40

savetier commented 8 months ago

Perhaps add "black box in tray (Plasma)" to the issue's title, it took me quite a while to find it. kuunha's files work perfectly!