Bug 569010 - TrayItem does not support dark theme on MacOS
Summary: TrayItem does not support dark theme on MacOS
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.18   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 578260
  Show dependency tree
 
Reported: 2020-11-20 18:51 EST by Dennis Ju CLA
Modified: 2022-01-18 08:19 EST (History)
0 users

See Also:


Attachments
image shows a menu bar icon without and with template set to true (394.08 KB, image/png)
2020-11-20 18:51 EST, Dennis Ju CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Ju CLA 2020-11-20 18:51:06 EST
Created attachment 284831 [details]
image shows a menu bar icon without and with template set to true

In order to support both MacOS light and dark themes menu bars, Apple recommends using a template NSImage. 

According to Apple's guidelines: "A template image discards color information and uses a mask to produce the appearance you see onscreen. Template images automatically adapt to the user’s appearance settings, so they look good on both dark and light menu bars, and when your menu bar extra is selected."
https://developer.apple.com/design/human-interface-guidelines/macos/extensions/menu-bar-extras/

Recent MacOS menu bars use black/white images (though color icons are still supported). In order to support the Apple's guidelines, SWT's TrayItem should set the template property to true.
Comment 1 Dennis Ju CLA 2020-11-20 18:58:56 EST
Here is a possible fix on my own cloned repo: https://github.com/dejuknow/eclipse.platform.swt/commit/416678ea48ab25772fba5089a423912504165356