Skip to content

Editor Theme doesn't update right away #16

Open

Description

@michael-hawker

Changing the "Editor Theme" setting doesn't consistently apply right away. Sometimes new documents will pick up the setting.

For now labeled as requires restart, but should investigate what's going on here. Not sure if issue within TabView of property change notification, or within the property pickup of the Monaco editor.

If we swap editors, will see if this persists or not as then helps narrow down where issue is.

Activity

  1. added
    bug
    good first issue
    on Oct 26, 2025
  2. michael-hawker commented on Dec 22, 2025

    @michael-hawker
    ContributorAuthor

    It also appears as if the light/dark mode button in the quick access bar doesn't show up right-away either. Not sure if related:

    Image
  3. added this to the 2.0 milestone on Dec 29, 2025
  4. AhmedMohamedGaber commented on Nov 26, 2026

    @AhmedMohamedGaber

    Did some code reading on this one, sharing in case it helps narrow it down:

    • The app-side chain looks sound: the Settings panel ComboBox writes SettingsService.EditorTheme (TwoWay), SettingsService.Set raises PropertyChanged("EditorTheme"), and Document.xaml binds monaco:CodeEditor.RequestedTheme OneWay to Settings.EditorTheme.
    • Nothing in Document.xaml.cs re-applies the theme after the editor has loaded.
    • So the likely suspect is the Monaco.Editor CodeEditor wrapper itself (WebView-hosted): my guess is RequestedTheme only takes effect when the editor (re)initializes, which matches "new documents pick up the setting".

    A fix would be either re-applying the theme / re-initializing the editor when the setting changes, or handling theme changes inside the Monaco.Editor wrapper. Since the issue mentions possibly swapping editors: want a PR that re-applies the theme on change here, or is this better left until the editor swap settles? (I don't have a Windows dev environment to verify behavior locally, so I'd rather not send a speculative PR.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issue

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions