Bug 469344 - KStatusNotifierItem on MacOS does not respect system theme when status=Active
Summary: KStatusNotifierItem on MacOS does not respect system theme when status=Active
Status: REPORTED
Alias: None
Product: frameworks-knotifications
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.105.0
Platform: unspecified macOS
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-04 08:37 UTC by ryanadolf123
Modified: 2023-05-04 08:37 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ryanadolf123 2023-05-04 08:37:01 UTC
SUMMARY

On MacOS, it is customary for menu bar icons to always be in monochrome colors. Depending on the color of the wallpaper chosen for the desktop, the menu bar icons will be either black or white.

For specifically MacOS, the QT icon's isMask property is tied to whether or not the status is set to Passive/Active. I assume this behavior arose for apps which are meant to be colorful when active and monochrome while passive. However, this assumption does not hold true for apps which wish to always display in monochrome color.

Ideally, the KStatusNotifierItem should not tie the icon's isMask property to its status, but instead let the app decide how its icon should be displayed.

Another alternative would be to build in some extra APIs to help navigate systems where monochrome icons should be used. MacOS makes this easy by allowing icons to be marked as masks/templates, but on Windows one would need to recolor the icon based on system settings.

STEPS TO REPRODUCE
1. Create a new icon: `auto icon = QIcon::fromTheme(...);`
2. Set the icon to a mask: `icon.setIsMask(true);`
3. Set the KStatusNotifierItem's icon: `systray.setIconByPixmap(icon);`
4: Set the status to active: `systray.setStatus(KStatusNotifierItem::Active);`

OBSERVED RESULT

The icon is no longer marked as a mask and does not respond to the system theme.

EXPECTED RESULT

The icon should still be marked as a mask.

SOFTWARE/OS VERSIONS
Windows: 
macOS: Ventura
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.105.0
Qt Version: 5

ADDITIONAL INFORMATION