Skip to content

Commit 3f0c6c8

Browse files
author
Benjamin Pasero
committed
focusedElementOutline => focusBorder
1 parent 8c844af commit 3f0c6c8

11 files changed

Lines changed: 21 additions & 30 deletions

File tree

extensions/theme-abyss/themes/abyss-color-theme.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@
253253

254254
// Base
255255
// "foreground": "",
256-
"focusedElementOutline": "#596F99",
256+
"focusBorder": "#596F99",
257257
"infoBorder": "#384078",
258258
"infoBackground": "#051336",
259259
"warningBackground": "#5B7E7A",

extensions/theme-quietlight/themes/quietlight-color-theme.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@
453453
}
454454
],
455455
"colors": {
456-
"focusedElementOutline": "#A6B39B",
456+
"focusBorder": "#A6B39B",
457457
"activityBarBackground": "#3E4932",
458458
"pickerGroupForeground": "#A6B39B",
459459
"pickerGroupBorder": "#749351",

extensions/theme-red/themes/Red-color-theme.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"peekViewResultsBackground": "#400000",
3333
"peekViewEditorBackground": "#300000",
3434
// UI
35-
"focusedElementOutline": "#ff6666aa",
35+
"focusBorder": "#ff6666aa",
3636
"buttonBackground": "#885555",
3737
"buttonHoverBackground": "#aa5555",
3838
"dropdownBackground": "#580000",

extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@
295295

296296
// Base
297297
// "foreground": "",
298-
"focusedElementOutline": "#2AA19899",
298+
"focusBorder": "#2AA19899",
299299
"infoBorder": "#384078",
300300
"infoBackground": "#051336",
301301
"warningBackground": "#5B7E7A",

extensions/theme-solarized-light/themes/solarized-light-color-theme.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@
308308
"inputBoxBackground": "#DDD6C1",
309309
"inputBoxForeground": "#586E75",
310310
"inputBoxActiveOptionBorder": "#2AA19899",
311-
"focusedElementOutline": "#2AA19899",
311+
"focusBorder": "#2AA19899",
312312
"titleBarActiveBackground": "#002C39",
313313
"titleBarInactiveBackground": "#002C39",
314314
"statusBarForeground": "#586E75",

extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"type": "dark",
33
"colors": {
4-
"focusedElementOutline": "#bbdaff",
4+
"focusBorder": "#bbdaff",
55
"inputBoxBackground": "#001733",
66
"dropdownBackground": "#001733",
77
"listFocusBackground": "#ffffff60",

src/vs/editor/contrib/rename/browser/renameInputField.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
1313
import { Range } from 'vs/editor/common/core/range';
1414
import { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from 'vs/editor/browser/editorBrowser';
1515
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
16-
import { inputBackground, inputBorder, inputForeground, widgetShadow, focus } from 'vs/platform/theme/common/colorRegistry';
16+
import { inputBackground, inputBorder, inputForeground, widgetShadow, focusBorder } from 'vs/platform/theme/common/colorRegistry';
1717
import { Position } from 'vs/editor/common/core/position';
1818

1919
export default class RenameInputField implements IContentWidget, IDisposable {
@@ -79,7 +79,7 @@ export default class RenameInputField implements IContentWidget, IDisposable {
7979
const background = theme.getColor(inputBackground);
8080
const foreground = theme.getColor(inputForeground);
8181
const widgetShadowColor = theme.getColor(widgetShadow);
82-
const border = theme.getColor(inputBorder) || theme.getColor(focus);
82+
const border = theme.getColor(inputBorder) || theme.getColor(focusBorder);
8383

8484
this._inputField.style.backgroundColor = background ? background.toString() : null;
8585
this._inputField.style.color = foreground ? foreground.toString() : null;

src/vs/platform/theme/common/colorRegistry.ts

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,10 @@ export function registerColor(id: string, defaults: ColorDefaults, description:
120120
// ----- base colors
121121

122122
export const foreground = registerColor('foreground', { dark: '#CCCCCC', light: '#6C6C6C', hc: '#FFFFFF' }, nls.localize('foreground', "Overall foreground color. This color is only used if not overridden by a component."));
123-
export const focus = registerColor('focusedElementOutline', {
124-
dark: Color.fromRGBA(new RGBA(14, 99, 156)).transparent(0.6),
125-
light: Color.fromRGBA(new RGBA(0, 122, 204)).transparent(0.4),
126-
hc: '#F38518'
127-
}, nls.localize('focusedElementOutline', "Overall outline/border color for focused elements. This color is only used if not overridden by a component."));
123+
export const focusBorder = registerColor('focusBorder', { dark: Color.fromRGBA(new RGBA(14, 99, 156)).transparent(0.6), light: Color.fromRGBA(new RGBA(0, 122, 204)).transparent(0.4), hc: '#F38518' }, nls.localize('focusBorder', "Overall border color for focused elements. This color is only used if not overridden by a component."));
124+
125+
export const highContrastBorder = registerColor('highContrastBorder', { light: null, dark: null, hc: '#6FC3DF' }, nls.localize('highContrastBorder', "Border color to separate components when high contrast theme is enabled."));
126+
export const highContrastOutline = registerColor('highContrastOutline', { light: null, dark: null, hc: focusBorder }, nls.localize('highContrastOutline', "Outline color for active components when high contrast theme is enabled."));
128127

129128
export const infoBackground = registerColor('infoBackground', { dark: '#063B49', light: '#D6ECF2', hc: Color.black }, nls.localize('infoBackground', "Overall info background color. This color is only used if not overridden by a component."));
130129
export const infoBorder = registerColor('infoBorder', { dark: '#55AAFF', light: '#009CCC', hc: '#6FC3DF' }, nls.localize('infoBorder', "Overall info border color. This color is only used if not overridden by a component."));
@@ -133,15 +132,7 @@ export const warningBorder = registerColor('warningBorder', { dark: '#B89500', l
133132
export const errorBackground = registerColor('errorBackground', { dark: '#5A1D1D', light: '#F2DEDE', hc: Color.black }, nls.localize('errorBackground', "Overall error background color. This color is only used if not overridden by a component."));
134133
export const errorBorder = registerColor('errorBorder', { dark: '#BE1100', light: '#E51400', hc: '#BE1100' }, nls.localize('errorBorder', "Overall error border color. This color is only used if not overridden by a component."));
135134

136-
/**
137-
* Commonly used High contrast colors.
138-
*/
139-
export const highContrastBorder = registerColor('highContrastBorder', { light: null, dark: null, hc: '#6FC3DF' }, nls.localize('highContrastBorder', "Border color to separate components when high contrast theme is enabled."));
140-
export const highContrastOutline = registerColor('highContrastOutline', { light: null, dark: null, hc: focus }, nls.localize('highContrastOutline', "Outline color for active components when high contrast theme is enabled."));
141-
142-
/**
143-
* Widgets
144-
*/
135+
// ----- widgets
145136
export const widgetShadow = registerColor('widgetShadow', { dark: '#000000', light: '#A8A8A8', hc: null }, nls.localize('widgetShadow', 'Shadow color of widgets such as find/replace inside the editor.'));
146137

147138
export const inputBackground = registerColor('inputBoxBackground', { dark: '#3C3C3C', light: Color.white, hc: Color.black }, nls.localize('inputBoxBackground', "Input box background."));

src/vs/workbench/browser/parts/activitybar/activitybarActions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { IViewletService, } from 'vs/workbench/services/viewlet/browser/viewlet'
2525
import { IPartService, Parts } from 'vs/workbench/services/part/common/partService';
2626
import { IThemeService, ITheme, registerThemingParticipant, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
2727
import { ACTIVITY_BAR_BADGE_FOREGROUND, ACTIVITY_BAR_BADGE_BACKGROUND, ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND, ACTIVITY_BAR_FOREGROUND } from 'vs/workbench/common/theme';
28-
import { highContrastBorder, highContrastOutline, focus } from 'vs/platform/theme/common/colorRegistry';
28+
import { highContrastBorder, highContrastOutline, focusBorder } from 'vs/platform/theme/common/colorRegistry';
2929

3030
export class ActivityAction extends Action {
3131
private badge: IBadge;
@@ -670,7 +670,7 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
670670

671671
// Styling without outline color
672672
else {
673-
const focusBorder = theme.getColor(focus);
673+
const focusBorderColor = theme.getColor(focusBorder);
674674

675675
collector.addRule(`
676676
.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active .action-label,
@@ -684,7 +684,7 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
684684
}
685685
686686
.monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:focus:before {
687-
border-left-color: ${focusBorder};
687+
border-left-color: ${focusBorderColor};
688688
}
689689
`);
690690
}

src/vs/workbench/browser/parts/panel/panelPart.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { ActionsOrientation, ActionBar } from 'vs/base/browser/ui/actionbar/acti
2626
import { ClosePanelAction, PanelAction, ToggleMaximizedPanelAction } from 'vs/workbench/browser/parts/panel/panelActions';
2727
import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
2828
import { PANEL_BACKGROUND, PANEL_BORDER_COLOR, PANEL_ACTIVE_TITLE_COLOR, PANEL_INACTIVE_TITLE_COLOR, PANEL_ACTIVE_TITLE_BORDER } from 'vs/workbench/common/theme';
29-
import { highContrastOutline, focus, highContrastBorder } from 'vs/platform/theme/common/colorRegistry';
29+
import { highContrastOutline, focusBorder, highContrastBorder } from 'vs/platform/theme/common/colorRegistry';
3030

3131
export class PanelPart extends CompositePart<Panel> implements IPanelService {
3232

@@ -214,11 +214,11 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
214214
`);
215215

216216
// Title focus
217-
const focusBorder = theme.getColor(focus);
217+
const focusBorderColor = theme.getColor(focusBorder);
218218
collector.addRule(`
219219
.monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label:focus {
220220
color: ${titleActive};
221-
border-bottom-color: ${focusBorder} !important;
221+
border-bottom-color: ${focusBorderColor} !important;
222222
border-bottom: 1px solid;
223223
outline: none;
224224
}

0 commit comments

Comments
 (0)