mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-09 04:16:38 +00:00
fix: theme service binding
cleaned up unused symbol closes #1742 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
parent
ed8ed15168
commit
c4172ee8e1
@ -323,8 +323,8 @@ import { NewCloudSketch } from './contributions/new-cloud-sketch';
|
|||||||
import { SketchbookCompositeWidget } from './widgets/sketchbook/sketchbook-composite-widget';
|
import { SketchbookCompositeWidget } from './widgets/sketchbook/sketchbook-composite-widget';
|
||||||
import { WindowTitleUpdater } from './theia/core/window-title-updater';
|
import { WindowTitleUpdater } from './theia/core/window-title-updater';
|
||||||
import { WindowTitleUpdater as TheiaWindowTitleUpdater } from '@theia/core/lib/browser/window/window-title-updater';
|
import { WindowTitleUpdater as TheiaWindowTitleUpdater } from '@theia/core/lib/browser/window/window-title-updater';
|
||||||
import { ThemeService } from './theia/core/theming';
|
import { ThemeServiceWithDB } from './theia/core/theming';
|
||||||
import { ThemeService as TheiaThemeService } from '@theia/core/lib/browser/theming';
|
import { ThemeServiceWithDB as TheiaThemeServiceWithDB } from '@theia/monaco/lib/browser/monaco-indexed-db';
|
||||||
import { MonacoThemingService } from './theia/monaco/monaco-theming-service';
|
import { MonacoThemingService } from './theia/monaco/monaco-theming-service';
|
||||||
import { MonacoThemingService as TheiaMonacoThemingService } from '@theia/monaco/lib/browser/monaco-theming-service';
|
import { MonacoThemingService as TheiaMonacoThemingService } from '@theia/monaco/lib/browser/monaco-theming-service';
|
||||||
import { TypeHierarchyServiceProvider } from './theia/typehierarchy/type-hierarchy-service';
|
import { TypeHierarchyServiceProvider } from './theia/typehierarchy/type-hierarchy-service';
|
||||||
@ -959,8 +959,8 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|||||||
rebind(TheiaWindowTitleUpdater).toService(WindowTitleUpdater);
|
rebind(TheiaWindowTitleUpdater).toService(WindowTitleUpdater);
|
||||||
|
|
||||||
// register Arduino themes
|
// register Arduino themes
|
||||||
bind(ThemeService).toSelf().inSingletonScope();
|
bind(ThemeServiceWithDB).toSelf().inSingletonScope();
|
||||||
rebind(TheiaThemeService).toService(ThemeService);
|
rebind(TheiaThemeServiceWithDB).toService(ThemeServiceWithDB);
|
||||||
bind(MonacoThemingService).toSelf().inSingletonScope();
|
bind(MonacoThemingService).toSelf().inSingletonScope();
|
||||||
rebind(TheiaMonacoThemingService).toService(MonacoThemingService);
|
rebind(TheiaMonacoThemingService).toService(MonacoThemingService);
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { ThemeService as TheiaThemeService } from '@theia/core/lib/browser/theming';
|
|
||||||
import type { Theme } from '@theia/core/lib/common/theme';
|
import type { Theme } from '@theia/core/lib/common/theme';
|
||||||
import { injectable } from '@theia/core/shared/inversify';
|
import { injectable } from '@theia/core/shared/inversify';
|
||||||
|
import { ThemeServiceWithDB as TheiaThemeServiceWithDB } from '@theia/monaco/lib/browser/monaco-indexed-db';
|
||||||
|
|
||||||
export namespace ArduinoThemes {
|
export namespace ArduinoThemes {
|
||||||
export const Light: Theme = {
|
export const Light: Theme = {
|
||||||
@ -18,7 +18,7 @@ export namespace ArduinoThemes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
export class ThemeService extends TheiaThemeService {
|
export class ThemeServiceWithDB extends TheiaThemeServiceWithDB {
|
||||||
protected override init(): void {
|
protected override init(): void {
|
||||||
this.register(ArduinoThemes.Light, ArduinoThemes.Dark);
|
this.register(ArduinoThemes.Light, ArduinoThemes.Dark);
|
||||||
super.init();
|
super.init();
|
||||||
|
@ -5,11 +5,3 @@
|
|||||||
export function setURL(url: URL, data: any = {}): void {
|
export function setURL(url: URL, data: any = {}): void {
|
||||||
history.pushState(data, '', url);
|
history.pushState(data, '', url);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* If available from the `window` object, then it means, the IDE2 has successfully patched the `MonacoThemingService#init` static method,
|
|
||||||
* and can wait the custom theme registration.
|
|
||||||
*/
|
|
||||||
export const MonacoThemeServiceIsReady = Symbol(
|
|
||||||
'@arduino-ide#monaco-theme-service-is-ready'
|
|
||||||
);
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user