Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Strange problem when Mac is set to Dark and Eclipse theme is Light in RCP app
Strange problem when Mac is set to Dark and Eclipse theme is Light in RCP app [message #1844171] Sat, 04 September 2021 10:57 Go to next message
Phil Beauvoir is currently offline Phil BeauvoirFriend
Messages: 62
Registered: October 2012
Member
Eclipse 4.21 RC2
macOS 11.5.2

With the following settings Eclipse correctly uses its own Light theme, even when the macOS theme is set to Dark:

- Mac Preferences, General, Appearance, Dark Theme
- Eclipse Preferences, General, Appearance, Light Theme

However, when using the same settings, our RCP application, Archi (https://www.archimatetool.com), many controls are not rendered using the Eclipse Light theme, as can be seen from the attached screenshot. We use the exact same Light theme as Eclipse itself.

If we build our RCP app against Eclipse 4.18 this problem does not occur.

Also, if I replace our RCP app's executable launcher with one from our Eclipse 4.18 based build, the problem also doesn't occur.

Running the following command for our executable launcher, "Archi" outputs "sdk 10.14", and for the older Eclipse 4.18 based version of the RCP app outputs "sdk 10.10"

otool -l Archi | grep sdk

So I think this has something to do with it.

But I don't understand how it is that this all works OK for Eclipse itself, but not for our RCP app?
Re: Strange problem when Mac is set to Dark and Eclipse theme is Light in RCP app [message #1844182 is a reply to message #1844171] Sun, 05 September 2021 08:05 Go to previous messageGo to next message
Phil Beauvoir is currently offline Phil BeauvoirFriend
Messages: 62
Registered: October 2012
Member
Running a child Eclipse instance from Eclipse displays the same problem.

1. Set the macOS system theme to Dark
2, Launch Eclipse 4.21
3. Set the Eclipse theme to Light - all controls display correctly
4. Run/Debug a child Eclipse
5. Set the child Eclipse theme to Light - display of controls is messed up

Obviously the first Eclipse instance is spawned from the launcher executable, and the child Eclipse instance is spawned using Java (AdoptOpenJDK-11.0.11+9). But if the Eclipse executable is compiled against SDK 10.14, and also Java binary is compiled against SDK 10.14, how come the first instance of Eclipse displays correctly, but not the second? Is their something different about the Eclipse executable?
Re: Strange problem when Mac is set to Dark and Eclipse theme is Light in RCP app [message #1844910 is a reply to message #1844182] Wed, 29 September 2021 13:59 Go to previous message
Phil Beauvoir is currently offline Phil BeauvoirFriend
Messages: 62
Registered: October 2012
Member
To answer my own question...

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
Previous Topic:Setting the location of a hover shell
Next Topic:Use dynamic models to quickly develop SWT applications
Goto Forum:
  


Current Time: Tue Nov 05 17:23:20 GMT 2024

Powered by FUDForum. Page generated in 0.03165 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top