Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 550003

Summary: Provide platform independent plug-in to set the OS dark theme
Product: [Eclipse Project] Platform Reporter: Lars Vogel <Lars.Vogel>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: alexandr.miloslavskiy, Lars.Vogel, lshanmug, niraj.modi, peter, ts-swt
Version: 4.13   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 444560, 546859    
Bug Blocks:    

Description Lars Vogel CLA 2019-08-13 06:56:29 EDT
org.eclipse.e4.ui.workbench.renderers.swt.cocoa provides CocoaDarkThemeProcessor.java which allows to set the dark theme for Mac OS to use native dark styling.

org.eclipse.e4.ui.swt.gtk provides DarkThemeProcessor.java which allows to set the dark them for Windows to use native dark styling.

Win32 will also provide soon (I hope) better native dark theme support via Bug 444560.

I suggest to fold CocoaDarkThemeProcessor and DarkThemeProcessor into a general add-on which works for all platforms. This required API in SWT to set this.
Comment 1 Lars Vogel CLA 2019-08-13 06:59:32 EDT
SWT team, do we already have API? I see the following:

GKT: display.asyncExec(() -> OS.setDarkThemePreferred(isDark));
Mac: display.asyncExec(() -> OS.setTheme(isDark));

Win?

Can we have OS independent API which we can call from Platform UI?
Comment 2 Alexandr Miloslavskiy CLA 2019-08-13 07:01:53 EDT
There was a lengthy discussion in Bug 546859 with unclear results.
Comment 3 Lars Vogel CLA 2020-03-30 11:30:32 EDT

*** This bug has been marked as a duplicate of bug 546859 ***