Bug 575960

Summary: [Mac] Light theme not rendering on child Eclipse if system theme is set to dark
Product: [Eclipse Project] Platform Reporter: Phil Beauvoir <p.beauvoir>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: alexis.drogoul
Version: 4.21   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=564645
Whiteboard:
Bug Depends on:    
Bug Blocks: 578260    
Attachments:
Description Flags
Screenshot none

Description Phil Beauvoir CLA 2021-09-14 03:36:47 EDT
Eclipse 4.21
AdoptOpenJDK-11.0.11+9
macOS Mojave, Catalina and Big Sur

1. Set the macOS system theme to Dark (System Preferences, General, Appearance, Dark)
2. Launch Eclipse
3. Run/Debug a child Eclipse instance
4. Set the child Eclipse theme to Light (Preferences, General, Appearance, Theme)

Only some of the light theme is working.
Comment 1 Phil Beauvoir CLA 2021-09-14 03:37:32 EDT
Created attachment 287125 [details]
Screenshot

Screenshot of child Eclipse
Comment 2 Alexis Drogoul CLA 2021-10-18 15:11:16 EDT
Interestingly, I have exactly the same issue when running a RCP application from Eclipse (see this issue here: https://github.com/gama-platform/gama/issues/3193). All modes work fine except the "light application in a dark os".
Comment 3 Phil Beauvoir CLA 2021-10-18 15:15:31 EDT
Add the following to Info.plist in the RCP app:

<key>NSRequiresAquaSystemAppearance</key>
<true/>

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=543889
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=540357
Comment 4 Alexis Drogoul CLA 2021-10-18 15:22:58 EDT
Hi Phil, will try and report back. Thanks for the tip !
Comment 5 Alexis Drogoul CLA 2021-10-18 15:26:25 EDT
@Phil: you saved my day. This is perfectly working. Thanks.
Comment 6 Phil Beauvoir CLA 2021-10-18 15:28:08 EDT
(In reply to Alexis Drogoul from comment #5)
> @Phil: you saved my day. This is perfectly working. Thanks.

Good.

It was only by a random chance that I discovered this. But, hey, that's how Eclipse development works - trial and error and no documentation.
Comment 7 Alexis Drogoul CLA 2021-10-18 15:32:50 EDT
Yep. I know ! However, it does not change the fact that running the application from Eclipse (w/o the Info.plist being used and read) exposes the same weird combinations of light/dark modes.