Theme flickers when setting theme #14656
Unanswered
YathindraNikshipth
asked this question in
General
Replies: 1 comment 5 replies
-
Hey @YathindraNikshipth, what exactly are you trying to accomplish? Do you want Theia to start up with your custom theme in place?
You mean your custom theme, or any other theme? Because your code leads me to believe that only your custom theme can be selected, and upon selecting any other theme, the method just returns. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to set the Theia theme using the setCurrentTheme method of the ThemeService before the loader starts. However, multiple checks repeatedly call setCurrentTheme, causing a theme flicker until Theia is fully initialized.
I believe I need to rebind ThemeServiceWithDB from @theia/monaco instead of ThemeService and override the setCurrentTheme method to meet my requirements, i binded my custom Class as follows:
rebind(ThemeServiceWithDB).to(CustomThemeServiceWithDB).inSingletonScope()
When I rebind ThemeServiceWithDB and override the setCurrentTheme method as required, the theme still flickers. However, when I go to the settings tab in the UI and manually change the color theme, the selected theme is not reflected.
Could you please let me know where I’m going wrong?
Beta Was this translation helpful? Give feedback.
All reactions