Skip to content

Commit

Permalink
vscode: add hcLight support (eclipse-theia#11589)
Browse files Browse the repository at this point in the history
The commit adds support for `hcLight` themes in the framework:
- adds support for a builtin `hc-light` theme.
- adds plugin support for `hcLight`.

Signed-off-by: vince-fugnitto <[email protected]>
  • Loading branch information
vince-fugnitto authored Dec 8, 2022
1 parent 85ca7ee commit 4440abd
Show file tree
Hide file tree
Showing 16 changed files with 1,057 additions and 280 deletions.
375 changes: 234 additions & 141 deletions packages/core/src/browser/common-frontend-contribution.ts

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion packages/core/src/browser/theming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,17 @@ export class BuiltinThemeProvider {
editorTheme: 'hc-theia' // loaded in /packages/monaco/src/browser/textmate/monaco-theme-registry.ts
};

static readonly hcLightTheme: Theme = {
id: 'hc-theia-light',
type: 'hcLight',
label: 'High Contrast Light (Theia)',
editorTheme: 'hc-theia-light' // loaded in /packages/monaco/src/browser/textmate/monaco-theme-registry.ts
};

static readonly themes = [
BuiltinThemeProvider.darkTheme,
BuiltinThemeProvider.lightTheme,
BuiltinThemeProvider.hcTheme
BuiltinThemeProvider.hcTheme,
BuiltinThemeProvider.hcLightTheme
];
}
4 changes: 2 additions & 2 deletions packages/core/src/common/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
// *****************************************************************************

export type ThemeType = 'light' | 'dark' | 'hc';
export type ThemeType = 'light' | 'dark' | 'hc' | 'hcLight';

export interface Theme {
readonly id: string;
Expand All @@ -27,7 +27,7 @@ export interface Theme {
}

export function isHighContrast(scheme: ThemeType): boolean {
return scheme === 'hc';
return scheme === 'hc' || scheme === 'hcLight';
}

export interface ThemeChangeEvent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1251,37 +1251,42 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
defaults: {
dark: '#ffff0033',
light: '#ffff6673',
hc: '#fff600'
hcDark: '#fff600',
hcLight: '#ffff6673'
}, description: 'Background color for the highlight of line at the top stack frame position.'
},
{
id: 'editor.focusedStackFrameHighlightBackground',
defaults: {
dark: '#7abd7a4d',
light: '#cee7ce73',
hc: '#cee7ce'
hcDark: '#cee7ce',
hcLight: '#cee7ce73'
}, description: 'Background color for the highlight of line at focused stack frame position.'
},
// Status bar colors should be aligned with debugging colors from https://code.visualstudio.com/api/references/theme-color#status-bar-colors
{
id: 'statusBar.debuggingBackground', defaults: {
dark: '#CC6633',
light: '#CC6633',
hc: '#CC6633'
hcDark: '#CC6633',
hcLight: '#B5200D'
}, description: 'Status bar background color when a program is being debugged. The status bar is shown in the bottom of the window'
},
{
id: 'statusBar.debuggingForeground', defaults: {
dark: 'statusBar.foreground',
light: 'statusBar.foreground',
hc: 'statusBar.foreground'
hcDark: 'statusBar.foreground',
hcLight: 'statusBar.foreground'
}, description: 'Status bar foreground color when a program is being debugged. The status bar is shown in the bottom of the window'
},
{
id: 'statusBar.debuggingBorder', defaults: {
dark: 'statusBar.border',
light: 'statusBar.border',
hc: 'statusBar.border'
hcDark: 'statusBar.border',
hcLight: 'statusBar.border'
}, description: 'Status bar border color separating to the sidebar and editor when a program is being debugged. The status bar is shown in the bottom of the window'
},
// Debug Exception Widget colors should be aligned with
Expand All @@ -1290,14 +1295,16 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
id: 'debugExceptionWidget.border', defaults: {
dark: '#a31515',
light: '#a31515',
hc: '#a31515'
hcDark: '#a31515',
hcLight: '#a31515'
}, description: 'Exception widget border color.',
},
{
id: 'debugExceptionWidget.background', defaults: {
dark: '#420b0d',
light: '#f1dfde',
hc: '#420b0d'
hcDark: '#420b0d',
hcLight: '#f1dfde'
}, description: 'Exception widget background color.'
},
// Debug Icon colors should be aligned with
Expand All @@ -1306,148 +1313,168 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
id: 'debugIcon.breakpointForeground', defaults: {
dark: '#E51400',
light: '#E51400',
hc: '#E51400'
hcDark: '#E51400',
hcLight: '#E51400'
},
description: 'Icon color for breakpoints.'
},
{
id: 'debugIcon.breakpointDisabledForeground', defaults: {
dark: '#848484',
light: '#848484',
hc: '#848484'
hcDark: '#848484',
hcLight: '#848484'
},
description: 'Icon color for disabled breakpoints.'
},
{
id: 'debugIcon.breakpointUnverifiedForeground', defaults: {
dark: '#848484',
light: '#848484',
hc: '#848484'
hcDark: '#848484',
hcLight: '#848484'
},
description: 'Icon color for unverified breakpoints.'
},
{
id: 'debugIcon.breakpointCurrentStackframeForeground', defaults: {
dark: '#FFCC00',
light: '#FFCC00',
hc: '#FFCC00'
light: '#BE8700',
hcDark: '#FFCC00',
hcLight: '#BE8700'
},
description: 'Icon color for the current breakpoint stack frame.'
},
{
id: 'debugIcon.breakpointStackframeForeground', defaults: {
dark: '#89D185',
light: '#89D185',
hc: '#89D185'
hcDark: '#89D185',
hcLight: '#89D185'
},
description: 'Icon color for all breakpoint stack frames.'
},
{
id: 'debugIcon.startForeground', defaults: {
dark: '#89D185',
light: '#388A34',
hc: '#89D185'
hcDark: '#89D185',
hcLight: '#388A34'
}, description: 'Debug toolbar icon for start debugging.'
},
{
id: 'debugIcon.pauseForeground', defaults: {
dark: '#75BEFF',
light: '#007ACC',
hc: '#75BEFF'
hcDark: '#75BEFF',
hcLight: '#007ACC'
}, description: 'Debug toolbar icon for pause.'
},
{
id: 'debugIcon.stopForeground', defaults: {
dark: '#F48771',
light: '#A1260D',
hc: '#F48771'
hcDark: '#F48771',
hcLight: '#A1260D'
}, description: 'Debug toolbar icon for stop.'
},
{
id: 'debugIcon.disconnectForeground', defaults: {
dark: '#F48771',
light: '#A1260D',
hc: '#F48771'
hcDark: '#F48771',
hcLight: '#A1260D'
}, description: 'Debug toolbar icon for disconnect.'
},
{
id: 'debugIcon.restartForeground', defaults: {
dark: '#89D185',
light: '#388A34',
hc: '#89D185'
hcDark: '#89D185',
hcLight: '#388A34'
}, description: 'Debug toolbar icon for restart.'
},
{
id: 'debugIcon.stepOverForeground', defaults: {
dark: '#75BEFF',
light: '#007ACC',
hc: '#75BEFF'
hcDark: '#75BEFF',
hcLight: '#007ACC',
}, description: 'Debug toolbar icon for step over.'
},
{
id: 'debugIcon.stepIntoForeground', defaults: {
dark: '#75BEFF',
light: '#007ACC',
hc: '#75BEFF'
hcDark: '#75BEFF',
hcLight: '#007ACC'
}, description: 'Debug toolbar icon for step into.'
},
{
id: 'debugIcon.stepOutForeground', defaults: {
dark: '#75BEFF',
light: '#007ACC',
hc: '#75BEFF'
hcDark: '#75BEFF',
hcLight: '#007ACC',
}, description: 'Debug toolbar icon for step over.'
},
{
id: 'debugIcon.continueForeground', defaults: {
dark: '#75BEFF',
light: '#007ACC',
hc: '#75BEFF'
hcDark: '#75BEFF',
hcLight: '#007ACC'
}, description: 'Debug toolbar icon for continue.'
},
{
id: 'debugIcon.stepBackForeground', defaults: {
dark: '#75BEFF',
light: '#007ACC',
hc: '#75BEFF'
hcDark: '#75BEFF',
hcLight: '#007ACC'
}, description: 'Debug toolbar icon for step back.'
},
{
id: 'debugConsole.infoForeground', defaults: {
dark: 'editorInfo.foreground',
light: 'editorInfo.foreground',
hc: 'foreground'
hcDark: 'foreground',
hcLight: 'foreground'
}, description: 'Foreground color for info messages in debug REPL console.'
},
{
id: 'debugConsole.warningForeground', defaults: {
dark: 'editorWarning.foreground',
light: 'editorWarning.foreground',
hc: '#008000'
hcDark: '#008000',
hcLight: 'editorWarning.foreground'
},
description: 'Foreground color for warning messages in debug REPL console.'
},
{
id: 'debugConsole.errorForeground', defaults: {
dark: 'errorForeground',
light: 'errorForeground',
hc: 'errorForeground'
hcDark: 'errorForeground',
hcLight: 'errorForeground'
},
description: 'Foreground color for error messages in debug REPL console.',
},
{
id: 'debugConsole.sourceForeground', defaults: {
dark: 'foreground',
light: 'foreground',
hc: 'foreground'
hcDark: 'foreground',
hcLight: 'foreground'
},
description: 'Foreground color for source filenames in debug REPL console.',
},
{
id: 'debugConsoleInputIcon.foreground', defaults: {
dark: 'foreground',
light: 'foreground',
hc: 'foreground'
hcDark: 'foreground',
hcLight: 'foreground'
},
description: 'Foreground color for debug console input marker icon.'
}
Expand Down
Loading

0 comments on commit 4440abd

Please sign in to comment.