8000 IDE startup theme based on OS theme by francescospissu · Pull Request #1160 · arduino/arduino-ide · GitHub
[go: up one dir, main page]

Skip to content

IDE startup theme based on OS theme #1160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 18, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view 8000
Diff view
Prev Previous commit
add custom themes in register
  • Loading branch information
francescospissu committed Jul 14, 2022
commit 35e18b6a1462fac4b5725f022b0da8d6364a9904
20 changes: 19 additions & 1 deletion electron/build/patch/frontend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,24 @@ const defaultTheme =
? darkTheme
: lightTheme;

const arduinoDarkTheme = {
id: 'arduino-theme-dark',
type: 'dark',
label: 'Dark (Arduino)',
editorTheme: 'arduino-theme-dark',
activate() { },
deactivate() { }
};

const arduinoLightTheme = {
id: 'arduino-theme',
type: 'light',
label: 'Light (Arduino)',
editorTheme: 'arduino-theme',
activate() { },
deactivate() { }
};

if (!window[ThemeServiceSymbol]) {
const themeService = new ThemeService();
Object.defineProperty(themeService, 'defaultTheme', {
Expand All @@ -31,7 +49,7 @@ if (!window[ThemeServiceSymbol]) {
);
},
});
themeService.register(...BuiltinThemeProvider.themes);
themeService.register(...BuiltinThemeProvider.themes, arduinoDarkTheme, arduinoLightTheme);
themeService.startupTheme();
themeService.setCurrentTheme(defaultTheme);
window[ThemeServiceSymbol] = themeService;
Expand Down
0