Bug 563270 - Dark theme leaking to other IDE instances
Summary: Dark theme leaking to other IDE instances
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.16   Edit
Hardware: All Windows 10
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
: 565477 (view as bug list)
Depends on:
Blocks: 577357
  Show dependency tree
 
Reported: 2020-05-17 12:50 EDT by Pierre-Yves Bigourdan CLA
Modified: 2022-01-18 08:36 EST (History)
4 users (show)

See Also:


Attachments
Dark elements in older non-themed Eclipse (196.64 KB, image/png)
2020-05-17 12:50 EDT, Pierre-Yves Bigourdan CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Yves Bigourdan CLA 2020-05-17 12:50:26 EDT
Created attachment 282900 [details]
Dark elements in older non-themed Eclipse

This morning I was experimenting with the latest Eclipse nightly build to investigate dark theme issues in Bug 562043.

This afternoon, I opened an older version of the IDE (2020-03 M1 from early January 2020). It has theming completely disabled, but I immediately noticed that some native elements were styled as dark. See attachment.

Closing the latest Eclipse nightly and restarting the older Eclipse do no solve the problem, my next attempt will be to restart the whole system, though postponing that for now as there's a big Windows update pending...

Are "OS.setTheme" or one of the newly introduced APIs changing settings at the operating system level, causing them to be applied to all IDE instances, even older ones that do not ship these new dark switches?
Comment 1 Pierre-Yves Bigourdan CLA 2020-05-17 13:43:50 EDT
Restarting the computer did not help. However, resetting all entries to default in "Colors and Fonts" made things go back to normal. Did some weird preference synchronisation happen somehow?
Comment 2 Rolf Theunissen CLA 2020-05-17 13:52:11 EDT
w.r.t. preference synchronization, how did you install the IDE's? When using Oomph (eclipse-installer) user preferences can be synchronized via the user setup, Navigate > Open Setup > User > User Preferences. Depending on your settings they might be automatically recorded and applied on startup.
Comment 3 Pierre-Yves Bigourdan CLA 2020-05-17 17:03:16 EDT
The older IDE version was indeed installed through Oomph. Though the nightly build was an unpacked zip from the Eclipse downloads website.

Granular styling attributes from one of the default built-in themes is really not the kind of thing that I would expect to be synchronized, even more so if it's some of the attributes but not others.
Comment 4 Rolf Theunissen CLA 2021-10-15 02:32:42 EDT
*** Bug 565477 has been marked as a duplicate of this bug. ***
Comment 5 Rolf Theunissen CLA 2021-10-15 03:02:23 EDT
When the dark theme is applied, many properties are touched. These property changes are detected by the Oomph properties recorder and (optionally) stored in the user profile. These properties get re-applied to other workbenches, including light ones.
As a result, the dark preferences could be applied to a light workbench.

Basically, there are multiple sets of (default) parameters, one for each theme. In a single workbench this is okay, assuming that a user doesn't switch all themes all the times and the user doesn't customize the theme properties themselves.

In the multi-workbench case, introduced by Oomph, this becomes an issue. Because its more likely that a user has workbenches with different themes.

@Ed: Do you have an opinion or some input on this?
Comment 6 Ed Merks CLA 2021-10-15 03:36:23 EDT
Generally the preference recorder has no idea what all these things actually mean and I'm not familiar with what's all recorded when changing the theme preference.  Ideally it would just be a single setting to be recorded and changing that would do all the necessary things, but I assume that isn't how it's actually implemented...
Comment 7 Wim Jongman CLA 2021-10-15 03:59:37 EDT
(In reply to Ed Merks from comment #6)
> Generally the preference recorder has no idea what all these things actually
> mean and I'm not familiar with what's all recorded when changing the theme
> preference.  Ideally it would just be a single setting to be recorded and
> changing that would do all the necessary things, but I assume that isn't how
> it's actually implemented...

Yes, that makes sense to me. The color preferences are independent of theming. If theming sets color preferences, there is no way to know later if they were set by theming or directly by the user.

Pierre, did your unzipped Eclipse operate on the same workspace?
Comment 8 Pierre-Yves Bigourdan CLA 2021-10-15 04:26:10 EDT
It's been a while, but I seem to recall it was a brand new workspace, which was all the more confusing.
Comment 9 Niraj Modi CLA 2022-01-18 08:36:20 EST
(In reply to Pierre-Yves Bigourdan from comment #0)
> Created attachment 282900 [details]
> Dark elements in older non-themed Eclipse

After a theme switch, Eclipse prompts for a restart and if we don't restart that may lead to above looking Eclipse. Otherwise I can't reproduce this issue.

Please share exact details on how to reproduce this issue.