Bug 481917 - KTeaTime symbolic tray icon fails to change colors e.g. when using a dark theme
Summary: KTeaTime symbolic tray icon fails to change colors e.g. when using a dark theme
Status: RESOLVED FIXED
Alias: None
Product: kteatime
Classification: Applications
Component: general (other bugs)
Version First Reported In: 24.02.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Stefan Böhmann
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-02-28 08:38 UTC by Jure Repinc
Modified: 2025-05-02 18:50 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 25.08.0
Sentry Crash Report:


Attachments
KTeaTime tray icon screenshots (4.81 KB, image/png)
2024-02-28 08:40 UTC, Jure Repinc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jure Repinc 2024-02-28 08:38:32 UTC
SUMMARY
There is a symbolic icon now in breeze package for KTeatime (/usr/share/icons/breeze-dark/apps/22/kteatime-symbolic.svg) but it is the same as the normal symbolic icon (/usr/share/icons/breeze/apps/22/kteatime-symbolic.svg). So it is a very dark icon and is almost invisible if the plasma theme for system tray/panels has dark or black background.


STEPS TO REPRODUCE
1. Set Plasma theme to use something dark or black for tray/panel background
2. Star KTeaTime

OBSERVED RESULT
KTeaTime icon is barely visible

EXPECTED RESULT
KTeaTime icons should be much more light to have good contrast with background

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20240225
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.6-1-default (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 7600 6-Core Processor
Memory: 31.1 GiB of RAM
Graphics Processor: AMD Radeon RX 480 Graphics
Comment 1 Jure Repinc 2024-02-28 08:40:02 UTC
Created attachment 166149 [details]
KTeaTime tray icon screenshots
Comment 2 Nate Graham 2024-02-29 17:57:25 UTC
Can reproduce. The icon being used here is `kteatime-symbolic` which does have the correct color-changing CSS hooked up properly. It seems to change color properly when I assign it as the icon of a folder and then change the color scheme. And all the other tray icons for plasmoids and apps that I have change color properly. So it could be that something's wrong in KTeaTime itself. Maybe it's rasterizing the icon to a pixmap or something.
Comment 3 Nate Graham 2024-02-29 18:55:35 UTC
Bug 481918 confirms my theory; that is what's happening.
Comment 4 Bug Janitor Service 2025-04-25 13:35:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kteatime/-/merge_requests/24
Comment 5 Fabian Vogt 2025-04-30 08:14:52 UTC
Git commit 641ca7e6150cbc8eef630367da2ac72f26d0b610 by Fabian Vogt.
Committed on 28/04/2025 at 11:32.
Pushed by fvogt into branch 'master'.

Port to KStatusNotifierItem

Using SNI instead of QSystemTrayIcon allows to pass icon names and pixmaps
for the main icon and overlay in combination. Make use of that functionality
to support themes better.
Related: bug 481918

M  +1    -0    .kde-ci.yml
M  +1    -0    CMakeLists.txt
M  +1    -0    src/CMakeLists.txt
M  +20   -21   src/toplevel.cpp
M  +3    -3    src/toplevel.h

https://invent.kde.org/utilities/kteatime/-/commit/641ca7e6150cbc8eef630367da2ac72f26d0b610