Bug 567631

Summary: [Win32][Mac] Using system theme keeps Eclipse in light mode permanently
Product: [Eclipse Project] Platform Reporter: Sravan Kumar Lakkimsetti <sravankumarl>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: hubert+eclipseorg, lshanmug, mistria
Version: 4.18   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=564380
Whiteboard:
Bug Depends on: 566906    
Bug Blocks:    
Attachments:
Description Flags
Eclipse on macOS bug sur system theme in dark mode none

Description Sravan Kumar Lakkimsetti CLA 2020-10-06 07:12:16 EDT
Switching of operating system theme does not switch eclipse theme when using system theme in Mac and Windows.

This does happen with Linux with system theme

In case of Mac, as long as we don't modify defaults for appearance property automatic switching happens. If we switch to system theme, theme stays in light mode. (regression from 547038)

In case of windows, system theme always stays in light mode irrespective of operating system mode.
Comment 1 Mickael Istria CLA 2020-10-06 07:31:25 EDT
This is a direct consequence of bug 566906 in SWT, and in the discussion, we learn that win32 API doesn't really have such themes and system colors are not modified. So the chosen colors are still the system ones, which is consistent with the theme expectation.
Comment 2 Sravan Kumar Lakkimsetti CLA 2020-10-06 07:40:55 EDT
In case of Mac, Eclipse launches in dark or light mode based on the OS setting as long as user did not touch the appearance property. 

Can this feature be added to system theme?
Comment 3 Mickael Istria CLA 2020-10-06 08:31:18 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #2)
> In case of Mac, Eclipse launches in dark or light mode based on the OS
> setting as long as user did not touch the appearance property. 
> 
> Can this feature be added to system theme?

Doesn't changing MacOS theme change the system colors in SWT?
The idea of the system theme is just to fully rely on SWT system colors. If those are changed, the theme does change without further settings.
If the system theme looks the same on Mac with different OS themes, then I think it's more an issue in SWT not properly retrieving the system colors; similarly to the current limitation on Windows.
Comment 4 Sravan Kumar Lakkimsetti CLA 2020-11-25 01:49:54 EST
(In reply to Mickael Istria from comment #3)
> (In reply to Sravan Kumar Lakkimsetti from comment #2)
> > In case of Mac, Eclipse launches in dark or light mode based on the OS
> > setting as long as user did not touch the appearance property. 
> > 
> > Can this feature be added to system theme?
> 
> Doesn't changing MacOS theme change the system colors in SWT?
> The idea of the system theme is just to fully rely on SWT system colors. If
> those are changed, the theme does change without further settings.
> If the system theme looks the same on Mac with different OS themes, then I
> think it's more an issue in SWT not properly retrieving the system colors;
> similarly to the current limitation on Windows.

I see two different behaviors in system theme in installed eclipse and runtime eclipse.

Installed eclipse permanently stays in light colored theme in case of installed eclipse.

for run time eclipse launched through run configuration I see some views having dark back ground (it is messy with editor and project explorer having dark background. Outline view and problems view having light background.
Comment 5 Sravan Kumar Lakkimsetti CLA 2020-11-25 06:54:04 EST
Created attachment 284882 [details]
Eclipse on macOS bug sur system theme in dark mode
Comment 6 Mickael Istria CLA 2020-11-25 07:27:01 EST
(In reply to Sravan Kumar Lakkimsetti from comment #5)
> Created attachment 284882 [details]
> Eclipse on macOS bug sur system theme in dark mode

How is it related to system theme?
Comment 7 Sravan Kumar Lakkimsetti CLA 2020-11-25 23:08:51 EST
(In reply to Mickael Istria from comment #6)
> (In reply to Sravan Kumar Lakkimsetti from comment #5)
> > Created attachment 284882 [details]
> > Eclipse on macOS bug sur system theme in dark mode
> 
> How is it related to system theme?

Machine is using dark mode and Eclipse is using system theme.
Comment 8 Mickael Istria CLA 2020-11-26 03:04:48 EST
(In reply to Sravan Kumar Lakkimsetti from comment #0)
> If we switch to system theme, theme stays in
> light mode. (regression from 547038)

As mentioned, I don't think it's a bug per so, System theme is supposed to react properly when changing OS theme.

> In case of windows, system theme always stays in light mode irrespective of
> operating system mode.

Windows does only have light mode; the OS themes are not propagated to apps, only a few apps do read the theme to select a different palette in the application logic, but according to Windows expert, it's not something we can leverage from system.

(In reply to Sravan Kumar Lakkimsetti from comment #5)
> Created attachment 284882 [details]
> Eclipse on macOS bug sur system theme in dark mode

It's indeed a bug; but a different one from the initial one in this ticket. Can you please open a separate bug with more details if possible (ie does it happen only with BigSur or also with other variants of macOS)?