Bug 567631 - [Win32][Mac] Using system theme keeps Eclipse in light mode permanently
Summary: [Win32][Mac] Using system theme keeps Eclipse in light mode permanently
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.18   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 566906
Blocks:
  Show dependency tree
 
Reported: 2020-10-06 07:12 EDT by Sravan Kumar Lakkimsetti CLA
Modified: 2021-01-05 13:07 EST (History)
3 users (show)

See Also:


Attachments
Eclipse on macOS bug sur system theme in dark mode (1.28 MB, image/png)
2020-11-25 06:54 EST, Sravan Kumar Lakkimsetti CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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)?