[frameworks-knotifications] [Bug 469344] New: KStatusNotifierItem on MacOS does not respect system theme when status=Active

bugzilla_noreply at kde.org bugzilla_noreply at kde.org
Thu May 4 09:37:01 BST 2023


https://bugs.kde.org/show_bug.cgi?id=469344

            Bug ID: 469344
           Summary: KStatusNotifierItem on MacOS does not respect system
                    theme when status=Active
    Classification: Frameworks and Libraries
           Product: frameworks-knotifications
           Version: 5.105.0
          Platform: unspecified
                OS: macOS
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kdelibs-bugs at kde.org
          Reporter: ryanadolf123 at gmail.com
                CC: kdelibs-bugs at kde.org
  Target Milestone: ---

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

-- 
You are receiving this mail because:
You are watching all bug changes.



More information about the kde-mac mailing list