Skip to content

Commit

Permalink
Use correct colors for problem markers (#10950)
Browse files Browse the repository at this point in the history
  • Loading branch information
msujew authored Mar 30, 2022
1 parent 7b8d3b7 commit 61cbbd3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 3 additions & 2 deletions packages/core/src/browser/common-frontend-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1313,14 +1313,15 @@ export class CommonFrontendContribution implements FrontendApplicationContributi
// TODO: Following are not yet supported/no respective elements in theia:
// list.focusBackground, list.focusForeground, list.inactiveFocusBackground, list.filterMatchBorder,
// list.dropBackground, listFilterWidget.outline, listFilterWidget.noMatchesOutline
// list.invalidItemForeground,
// list.warningForeground, list.errorForeground => tree node needs an respective class
// list.invalidItemForeground => tree node needs an respective class
{ id: 'list.activeSelectionBackground', defaults: { dark: '#094771', light: '#0074E8' }, description: 'List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.' },
{ id: 'list.activeSelectionForeground', defaults: { dark: '#FFF', light: '#FFF' }, description: 'List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.' },
{ id: 'list.inactiveSelectionBackground', defaults: { dark: '#37373D', light: '#E4E6F1' }, description: 'List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.' },
{ id: 'list.inactiveSelectionForeground', description: 'List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.' },
{ id: 'list.hoverBackground', defaults: { dark: '#2A2D2E', light: '#F0F0F0' }, description: 'List/Tree background when hovering over items using the mouse.' },
{ id: 'list.hoverForeground', description: 'List/Tree foreground when hovering over items using the mouse.' },
{ id: 'list.errorForeground', defaults: { dark: '#F88070', light: '#B01011' }, description: 'Foreground color of list items containing errors.' },
{ id: 'list.warningForeground', defaults: { dark: '#CCA700', light: '#855F00' }, description: 'Foreground color of list items containing warnings.' },
{ id: 'list.filterMatchBackground', defaults: { dark: 'editor.findMatchHighlightBackground', light: 'editor.findMatchHighlightBackground' }, description: 'Background color of the filtered match.' },
{ id: 'list.highlightForeground', defaults: { dark: '#18A3FF', light: '#0066BF', hc: 'focusBorder' }, description: 'List/Tree foreground color of the match highlights when searching inside the list/tree.' },
{ id: 'list.focusHighlightForeground', defaults: { dark: 'list.highlightForeground', light: 'list.activeSelectionForeground', hc: 'list.highlightForeground' }, description: 'List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.' },
Expand Down
5 changes: 2 additions & 3 deletions packages/markers/src/browser/problem/problem-decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,8 @@ export class ProblemDecorator implements TreeDecorator {
protected getColor(marker: Marker<Diagnostic>): TreeDecoration.Color {
const { severity } = marker.data;
switch (severity) {
case 1: return 'var(--theia-editorError-foreground)';
case 2: return 'var(--theia-editorWarning-foreground)';
case 3: return 'var(--theia-editorInfo-foreground)';
case 1: return 'var(--theia-list-errorForeground)';
case 2: return 'var(--theia-list-warningForeground)';
default: return 'var(--theia-successBackground)';
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,8 @@ export class ProblemTabBarDecorator implements TabBarDecorator {
protected getOverlayIconColor(marker: Marker<Diagnostic>): WidgetDecoration.Color {
const { severity } = marker.data;
switch (severity) {
case 1: return 'var(--theia-editorError-foreground)';
case 2: return 'var(--theia-editorWarning-foreground)';
case 3: return 'var(--theia-editorInfo-foreground)';
case 1: return 'var(--theia-list-errorForeground)';
case 2: return 'var(--theia-list-warningForeground)';
default: return 'var(--theia-successBackground)';
}
}
Expand Down

0 comments on commit 61cbbd3

Please sign in to comment.