Skip to content

Add a Themes submenu to Window > Appearance - #4356

Draft
vogella wants to merge 2 commits into
eclipse-platform:masterfrom
vogella:vogella/appearance-themes-menu
Draft

Add a Themes submenu to Window > Appearance#4356
vogella wants to merge 2 commits into
eclipse-platform:masterfrom
vogella:vogella/appearance-themes-menu

Conversation

@vogella

@vogella vogella commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Switching the theme so far meant opening the appearance preferences. This adds a Themes submenu under Window > Appearance that lists the installed themes as radio items, applies the pick right away and remembers it for the next start. A switch between a light and a dark theme offers a restart, and a last entry records the active theme as the default for new workspaces.

The items are built in the workbench, where the theme engine is visible, and instantiated from the IDE menu through ExtensionFactory like the Show In menu. In high contrast mode no items are offered, matching the appearance preferences.

Stacked on #4354: the first commit is that PR, only the second one belongs here. Please merge #4354 first, this branch will then rebase down to a single commit.

The theme extension point gains an "isDarkTheme" attribute, so a theme states
its appearance instead of the platform guessing it from the theme id. Themes
without the attribute keep the id based classification.

ThemeEngine uses ITheme.isDark() for the SWT appearance preference and when
picking a dark theme to inherit the operating system setting, so a product
shipping its own dark theme works too. The appearance preferences recommend a
restart only when switching between light and dark. The flag is persisted next
to the theme id, which lets IDEApplication style the workspace selection dialog
before the theme engine exists.

Assisted-by: multiple AI agents and layers of automated tooling 🤖
Switching the theme so far meant opening the appearance preferences. The
submenu lists the installed themes as radio items, applies the pick right away
and remembers it for the next start. A light/dark switch offers a restart, and
a last entry records the active theme as the default for new workspaces.

The items are built in the workbench, where the theme engine is visible, and
instantiated from the IDE menu through ExtensionFactory like the Show In menu.

Assisted-by: multiple AI agents and layers of automated tooling 🤖
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Test Results

   858 files  ±0     858 suites  ±0   56m 58s ⏱️ + 5m 13s
 8 285 tests +2   8 042 ✅ +2  243 💤 ±0  0 ❌ ±0 
20 724 runs  +6  20 054 ✅ +6  670 💤 ±0  0 ❌ ±0 

Results for commit f6498cf. ± Comparison against base commit 8191d66.

@merks

merks commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

That's quite some additional complexity to maintain forever. Should we ask ourselves if users really switch often enough that this needs to be more convenient for them?

@sratz

sratz commented Sep 7, 2026

Copy link
Copy Markdown
Member

That's quite some additional complexity to maintain forever. Should we ask ourselves if users really switch often enough that this needs to be more convenient for them?

I think most of the complexity is because this PR builds on #4354. Only the top commit is the actual menu entry.

But I agree: Since switching theme requires a restart, is this a feature a people would actually use in practice?

@akurtakov

akurtakov commented Sep 7, 2026

Copy link
Copy Markdown
Member

IMO poll/vote is best in the cases like this one where there is no agreement about a change in general.

That aside, the PR still needs some work as the case of theming engine is not considered (the menu should not be shown in this case for sure) but with this PR it is and looks like
image

@vogella

vogella commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

@sratz switching between different light and dark themes does not require a restart anymore after we merge the is dark pr. We only require a restart at the moment because we do not know if a theme wants the native dark styling or not.

I park this as draft for the moment.

@vogella
vogella marked this pull request as draft September 7, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants