Add a Themes submenu to Window > Appearance - #4356
Conversation
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 🤖
|
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? |
|
@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. |

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
ExtensionFactorylike 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.