Skip to content

Commit 677ff6e

Browse files
author
Miguel Solorio
committed
Add activity bar active border focus color
1 parent 36bf1c9 commit 677ff6e

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { ActivityAction, ActivityActionViewItem, ICompositeBar, ICompositeBarCol
2222
import { ViewletDescriptor } from 'vs/workbench/browser/viewlet';
2323
import { Extensions as ActionExtensions, IWorkbenchActionRegistry } from 'vs/workbench/common/actions';
2424
import { IActivity } from 'vs/workbench/common/activity';
25-
import { ACTIVITY_BAR_FOREGROUND, ACTIVITY_BAR_ACTIVE_BORDER, ACTIVITY_BAR_ACTIVE_BACKGROUND } from 'vs/workbench/common/theme';
25+
import { ACTIVITY_BAR_FOREGROUND, ACTIVITY_BAR_ACTIVE_BORDER, ACTIVITY_BAR_ACTIVE_BORDER_FOCUS, ACTIVITY_BAR_ACTIVE_BACKGROUND } from 'vs/workbench/common/theme';
2626
import { IActivityBarService } from 'vs/workbench/services/activityBar/browser/activityBarService';
2727
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
2828
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
@@ -297,6 +297,20 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
297297
`);
298298
}
299299

300+
const activeBorderFocusColor = theme.getColor(ACTIVITY_BAR_ACTIVE_BORDER_FOCUS);
301+
if (activeBorderFocusColor) {
302+
collector.addRule(`
303+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:focus::before {
304+
visibility: hidden;
305+
}
306+
307+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:focus .active-item-indicator:before {
308+
visibility: visible;
309+
border-left-color: ${activeBorderFocusColor};
310+
}
311+
`);
312+
}
313+
300314
const activeBackgroundColor = theme.getColor(ACTIVITY_BAR_ACTIVE_BACKGROUND);
301315
if (activeBackgroundColor) {
302316
collector.addRule(`

src/vs/workbench/common/theme.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,12 @@ export const ACTIVITY_BAR_ACTIVE_BORDER = registerColor('activityBar.activeBorde
352352
hc: null
353353
}, nls.localize('activityBarActiveBorder', "Activity bar border color for the active item. The activity bar is showing on the far left or right and allows to switch between views of the side bar."));
354354

355+
export const ACTIVITY_BAR_ACTIVE_BORDER_FOCUS = registerColor('activityBar.activeBorderFocus', {
356+
dark: null,
357+
light: null,
358+
hc: null
359+
}, nls.localize('activityBarActiveBorderFocus', "Activity bar focus border color for the active item. The activity bar is showing on the far left or right and allows to switch between views of the side bar."));
360+
355361
export const ACTIVITY_BAR_ACTIVE_BACKGROUND = registerColor('activityBar.activeBackground', {
356362
dark: null,
357363
light: null,

0 commit comments

Comments
 (0)