Path: blob/main/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import './media/activitybarpart.css';6import './media/activityaction.css';7import { localize, localize2 } from '../../../../nls.js';8import { ActionsOrientation } from '../../../../base/browser/ui/actionbar/actionbar.js';9import { Part } from '../../part.js';10import { ActivityBarPosition, IWorkbenchLayoutService, LayoutSettings, Parts, Position } from '../../../services/layout/browser/layoutService.js';11import { IInstantiationService, ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js';12import { DisposableStore, MutableDisposable } from '../../../../base/common/lifecycle.js';13import { ToggleSidebarPositionAction, ToggleSidebarVisibilityAction } from '../../actions/layoutActions.js';14import { IThemeService, IColorTheme, registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';15import { ACTIVITY_BAR_BACKGROUND, ACTIVITY_BAR_BORDER, ACTIVITY_BAR_FOREGROUND, ACTIVITY_BAR_ACTIVE_BORDER, ACTIVITY_BAR_BADGE_BACKGROUND, ACTIVITY_BAR_BADGE_FOREGROUND, ACTIVITY_BAR_INACTIVE_FOREGROUND, ACTIVITY_BAR_ACTIVE_BACKGROUND, ACTIVITY_BAR_DRAG_AND_DROP_BORDER, ACTIVITY_BAR_ACTIVE_FOCUS_BORDER } from '../../../common/theme.js';16import { activeContrastBorder, contrastBorder, focusBorder } from '../../../../platform/theme/common/colorRegistry.js';17import { addDisposableListener, append, EventType, isAncestor, $, clearNode } from '../../../../base/browser/dom.js';18import { assertReturnsDefined } from '../../../../base/common/types.js';19import { CustomMenubarControl } from '../titlebar/menubarControl.js';20import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';21import { getMenuBarVisibility, MenuSettings } from '../../../../platform/window/common/window.js';22import { IAction, Separator, SubmenuAction, toAction } from '../../../../base/common/actions.js';23import { StandardKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';24import { KeyCode } from '../../../../base/common/keyCodes.js';25import { HoverPosition } from '../../../../base/browser/ui/hover/hoverWidget.js';26import { GestureEvent } from '../../../../base/browser/touch.js';27import { IPaneCompositePart } from '../paneCompositePart.js';28import { IPaneCompositeBarOptions, PaneCompositeBar } from '../paneCompositeBar.js';29import { GlobalCompositeBar } from '../globalCompositeBar.js';30import { IStorageService } from '../../../../platform/storage/common/storage.js';31import { Action2, IMenuService, MenuId, MenuRegistry, registerAction2 } from '../../../../platform/actions/common/actions.js';32import { ContextKeyExpr, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';33import { Categories } from '../../../../platform/action/common/actionCommonCategories.js';34import { getContextMenuActions } from '../../../../platform/actions/browser/menuEntryActionViewItem.js';35import { IViewDescriptorService, ViewContainerLocation, ViewContainerLocationToString } from '../../../common/views.js';36import { IExtensionService } from '../../../services/extensions/common/extensions.js';37import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js';38import { IViewsService } from '../../../services/views/common/viewsService.js';39import { SwitchCompositeViewAction } from '../compositeBarActions.js';4041export class ActivitybarPart extends Part {4243static readonly ACTION_HEIGHT = 48;4445static readonly pinnedViewContainersKey = 'workbench.activity.pinnedViewlets2';46static readonly placeholderViewContainersKey = 'workbench.activity.placeholderViewlets';47static readonly viewContainersWorkspaceStateKey = 'workbench.activity.viewletsWorkspaceState';4849//#region IView5051readonly minimumWidth: number = 48;52readonly maximumWidth: number = 48;53readonly minimumHeight: number = 0;54readonly maximumHeight: number = Number.POSITIVE_INFINITY;5556//#endregion5758private readonly compositeBar = this._register(new MutableDisposable<PaneCompositeBar>());59private content: HTMLElement | undefined;6061constructor(62private readonly paneCompositePart: IPaneCompositePart,63@IInstantiationService private readonly instantiationService: IInstantiationService,64@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,65@IThemeService themeService: IThemeService,66@IStorageService storageService: IStorageService,67) {68super(Parts.ACTIVITYBAR_PART, { hasTitle: false }, themeService, storageService, layoutService);69}7071private createCompositeBar(): PaneCompositeBar {72return this.instantiationService.createInstance(ActivityBarCompositeBar, {73partContainerClass: 'activitybar',74pinnedViewContainersKey: ActivitybarPart.pinnedViewContainersKey,75placeholderViewContainersKey: ActivitybarPart.placeholderViewContainersKey,76viewContainersWorkspaceStateKey: ActivitybarPart.viewContainersWorkspaceStateKey,77orientation: ActionsOrientation.VERTICAL,78icon: true,79iconSize: 24,80activityHoverOptions: {81position: () => this.layoutService.getSideBarPosition() === Position.LEFT ? HoverPosition.RIGHT : HoverPosition.LEFT,82},83preventLoopNavigation: true,84recomputeSizes: false,85fillExtraContextMenuActions: (actions, e?: MouseEvent | GestureEvent) => { },86compositeSize: 52,87colors: (theme: IColorTheme) => ({88activeForegroundColor: theme.getColor(ACTIVITY_BAR_FOREGROUND),89inactiveForegroundColor: theme.getColor(ACTIVITY_BAR_INACTIVE_FOREGROUND),90activeBorderColor: theme.getColor(ACTIVITY_BAR_ACTIVE_BORDER),91activeBackground: theme.getColor(ACTIVITY_BAR_ACTIVE_BACKGROUND),92badgeBackground: theme.getColor(ACTIVITY_BAR_BADGE_BACKGROUND),93badgeForeground: theme.getColor(ACTIVITY_BAR_BADGE_FOREGROUND),94dragAndDropBorder: theme.getColor(ACTIVITY_BAR_DRAG_AND_DROP_BORDER),95activeBackgroundColor: undefined, inactiveBackgroundColor: undefined, activeBorderBottomColor: undefined,96}),97overflowActionSize: ActivitybarPart.ACTION_HEIGHT,98}, Parts.ACTIVITYBAR_PART, this.paneCompositePart, true);99}100101protected override createContentArea(parent: HTMLElement): HTMLElement {102this.element = parent;103this.content = append(this.element, $('.content'));104105if (this.layoutService.isVisible(Parts.ACTIVITYBAR_PART)) {106this.show();107}108109return this.content;110}111112getPinnedPaneCompositeIds(): string[] {113return this.compositeBar.value?.getPinnedPaneCompositeIds() ?? [];114}115116getVisiblePaneCompositeIds(): string[] {117return this.compositeBar.value?.getVisiblePaneCompositeIds() ?? [];118}119120getPaneCompositeIds(): string[] {121return this.compositeBar.value?.getPaneCompositeIds() ?? [];122}123124focus(): void {125this.compositeBar.value?.focus();126}127128override updateStyles(): void {129super.updateStyles();130131const container = assertReturnsDefined(this.getContainer());132const background = this.getColor(ACTIVITY_BAR_BACKGROUND) || '';133container.style.backgroundColor = background;134135const borderColor = this.getColor(ACTIVITY_BAR_BORDER) || this.getColor(contrastBorder) || '';136container.classList.toggle('bordered', !!borderColor);137container.style.borderColor = borderColor ? borderColor : '';138}139140show(focus?: boolean): void {141if (!this.content) {142return;143}144145if (!this.compositeBar.value) {146this.compositeBar.value = this.createCompositeBar();147this.compositeBar.value.create(this.content);148149if (this.dimension) {150this.layout(this.dimension.width, this.dimension.height);151}152}153154if (focus) {155this.focus();156}157}158159hide(): void {160if (!this.compositeBar.value) {161return;162}163164this.compositeBar.clear();165166if (this.content) {167clearNode(this.content);168}169}170171override layout(width: number, height: number): void {172super.layout(width, height, 0, 0);173174if (!this.compositeBar.value) {175return;176}177178// Layout contents179const contentAreaSize = super.layoutContents(width, height).contentSize;180181// Layout composite bar182this.compositeBar.value.layout(width, contentAreaSize.height);183}184185toJSON(): object {186return {187type: Parts.ACTIVITYBAR_PART188};189}190}191192export class ActivityBarCompositeBar extends PaneCompositeBar {193194private element: HTMLElement | undefined;195196private readonly menuBar = this._register(new MutableDisposable<CustomMenubarControl>());197private menuBarContainer: HTMLElement | undefined;198private compositeBarContainer: HTMLElement | undefined;199private readonly globalCompositeBar: GlobalCompositeBar | undefined;200201private readonly keyboardNavigationDisposables = this._register(new DisposableStore());202203constructor(204options: IPaneCompositeBarOptions,205part: Parts,206paneCompositePart: IPaneCompositePart,207showGlobalActivities: boolean,208@IInstantiationService instantiationService: IInstantiationService,209@IStorageService storageService: IStorageService,210@IExtensionService extensionService: IExtensionService,211@IViewDescriptorService viewDescriptorService: IViewDescriptorService,212@IViewsService viewService: IViewsService,213@IContextKeyService contextKeyService: IContextKeyService,214@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService,215@IConfigurationService private readonly configurationService: IConfigurationService,216@IMenuService private readonly menuService: IMenuService,217@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,218) {219super({220...options,221fillExtraContextMenuActions: (actions, e) => {222options.fillExtraContextMenuActions(actions, e);223this.fillContextMenuActions(actions, e);224}225}, part, paneCompositePart, instantiationService, storageService, extensionService, viewDescriptorService, viewService, contextKeyService, environmentService, layoutService);226227if (showGlobalActivities) {228this.globalCompositeBar = this._register(instantiationService.createInstance(GlobalCompositeBar, () => this.getContextMenuActions(), (theme: IColorTheme) => this.options.colors(theme), this.options.activityHoverOptions));229}230231// Register for configuration changes232this._register(this.configurationService.onDidChangeConfiguration(e => {233if (e.affectsConfiguration(MenuSettings.MenuBarVisibility)) {234if (getMenuBarVisibility(this.configurationService) === 'compact') {235this.installMenubar();236} else {237this.uninstallMenubar();238}239}240}));241}242243private fillContextMenuActions(actions: IAction[], e?: MouseEvent | GestureEvent) {244// Menu245const menuBarVisibility = getMenuBarVisibility(this.configurationService);246if (menuBarVisibility === 'compact' || menuBarVisibility === 'hidden' || menuBarVisibility === 'toggle') {247actions.unshift(...[toAction({ id: 'toggleMenuVisibility', label: localize('menu', "Menu"), checked: menuBarVisibility === 'compact', run: () => this.configurationService.updateValue(MenuSettings.MenuBarVisibility, menuBarVisibility === 'compact' ? 'toggle' : 'compact') }), new Separator()]);248}249250if (menuBarVisibility === 'compact' && this.menuBarContainer && e?.target) {251if (isAncestor(e.target as Node, this.menuBarContainer)) {252actions.unshift(...[toAction({ id: 'hideCompactMenu', label: localize('hideMenu', "Hide Menu"), run: () => this.configurationService.updateValue(MenuSettings.MenuBarVisibility, 'toggle') }), new Separator()]);253}254}255256// Global Composite Bar257if (this.globalCompositeBar) {258actions.push(new Separator());259actions.push(...this.globalCompositeBar.getContextMenuActions());260}261actions.push(new Separator());262actions.push(...this.getActivityBarContextMenuActions());263}264265private uninstallMenubar() {266if (this.menuBar.value) {267this.menuBar.value = undefined;268}269270if (this.menuBarContainer) {271this.menuBarContainer.remove();272this.menuBarContainer = undefined;273}274}275276private installMenubar() {277if (this.menuBar.value) {278return; // prevent menu bar from installing twice #110720279}280281this.menuBarContainer = $('.menubar');282283const content = assertReturnsDefined(this.element);284content.prepend(this.menuBarContainer);285286// Menubar: install a custom menu bar depending on configuration287this.menuBar.value = this._register(this.instantiationService.createInstance(CustomMenubarControl));288this.menuBar.value.create(this.menuBarContainer);289290}291292private registerKeyboardNavigationListeners(): void {293this.keyboardNavigationDisposables.clear();294295// Up/Down or Left/Right arrow on compact menu296if (this.menuBarContainer) {297this.keyboardNavigationDisposables.add(addDisposableListener(this.menuBarContainer, EventType.KEY_DOWN, e => {298const kbEvent = new StandardKeyboardEvent(e);299if (kbEvent.equals(KeyCode.DownArrow) || kbEvent.equals(KeyCode.RightArrow)) {300this.focus();301}302}));303}304305// Up/Down on Activity Icons306if (this.compositeBarContainer) {307this.keyboardNavigationDisposables.add(addDisposableListener(this.compositeBarContainer, EventType.KEY_DOWN, e => {308const kbEvent = new StandardKeyboardEvent(e);309if (kbEvent.equals(KeyCode.DownArrow) || kbEvent.equals(KeyCode.RightArrow)) {310this.globalCompositeBar?.focus();311} else if (kbEvent.equals(KeyCode.UpArrow) || kbEvent.equals(KeyCode.LeftArrow)) {312this.menuBar.value?.toggleFocus();313}314}));315}316317// Up arrow on global icons318if (this.globalCompositeBar) {319this.keyboardNavigationDisposables.add(addDisposableListener(this.globalCompositeBar.element, EventType.KEY_DOWN, e => {320const kbEvent = new StandardKeyboardEvent(e);321if (kbEvent.equals(KeyCode.UpArrow) || kbEvent.equals(KeyCode.LeftArrow)) {322this.focus(this.getVisiblePaneCompositeIds().length - 1);323}324}));325}326}327328override create(parent: HTMLElement): HTMLElement {329this.element = parent;330331// Install menubar if compact332if (getMenuBarVisibility(this.configurationService) === 'compact') {333this.installMenubar();334}335336// View Containers action bar337this.compositeBarContainer = super.create(this.element);338339// Global action bar340if (this.globalCompositeBar) {341this.globalCompositeBar.create(this.element);342}343344// Keyboard Navigation345this.registerKeyboardNavigationListeners();346347return this.compositeBarContainer;348}349350override layout(width: number, height: number): void {351if (this.menuBarContainer) {352if (this.options.orientation === ActionsOrientation.VERTICAL) {353height -= this.menuBarContainer.clientHeight;354} else {355width -= this.menuBarContainer.clientWidth;356}357}358if (this.globalCompositeBar) {359if (this.options.orientation === ActionsOrientation.VERTICAL) {360height -= (this.globalCompositeBar.size() * ActivitybarPart.ACTION_HEIGHT);361} else {362width -= this.globalCompositeBar.element.clientWidth;363}364}365super.layout(width, height);366}367368getActivityBarContextMenuActions(): IAction[] {369const activityBarPositionMenu = this.menuService.getMenuActions(MenuId.ActivityBarPositionMenu, this.contextKeyService, { shouldForwardArgs: true, renderShortTitle: true });370const positionActions = getContextMenuActions(activityBarPositionMenu).secondary;371const actions = [372new SubmenuAction('workbench.action.panel.position', localize('activity bar position', "Activity Bar Position"), positionActions),373toAction({ id: ToggleSidebarPositionAction.ID, label: ToggleSidebarPositionAction.getLabel(this.layoutService), run: () => this.instantiationService.invokeFunction(accessor => new ToggleSidebarPositionAction().run(accessor)) }),374];375376if (this.part === Parts.SIDEBAR_PART) {377actions.push(toAction({ id: ToggleSidebarVisibilityAction.ID, label: ToggleSidebarVisibilityAction.LABEL, run: () => this.instantiationService.invokeFunction(accessor => new ToggleSidebarVisibilityAction().run(accessor)) }));378}379380return actions;381}382383}384385registerAction2(class extends Action2 {386constructor() {387super({388id: 'workbench.action.activityBarLocation.default',389title: {390...localize2('positionActivityBarDefault', 'Move Activity Bar to Side'),391mnemonicTitle: localize({ key: 'miDefaultActivityBar', comment: ['&& denotes a mnemonic'] }, "&&Default"),392},393shortTitle: localize('default', "Default"),394category: Categories.View,395toggled: ContextKeyExpr.equals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.DEFAULT),396menu: [{397id: MenuId.ActivityBarPositionMenu,398order: 1399}, {400id: MenuId.CommandPalette,401when: ContextKeyExpr.notEquals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.DEFAULT),402}]403});404}405run(accessor: ServicesAccessor): void {406const configurationService = accessor.get(IConfigurationService);407configurationService.updateValue(LayoutSettings.ACTIVITY_BAR_LOCATION, ActivityBarPosition.DEFAULT);408}409});410411registerAction2(class extends Action2 {412constructor() {413super({414id: 'workbench.action.activityBarLocation.top',415title: {416...localize2('positionActivityBarTop', 'Move Activity Bar to Top'),417mnemonicTitle: localize({ key: 'miTopActivityBar', comment: ['&& denotes a mnemonic'] }, "&&Top"),418},419shortTitle: localize('top', "Top"),420category: Categories.View,421toggled: ContextKeyExpr.equals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.TOP),422menu: [{423id: MenuId.ActivityBarPositionMenu,424order: 2425}, {426id: MenuId.CommandPalette,427when: ContextKeyExpr.notEquals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.TOP),428}]429});430}431run(accessor: ServicesAccessor): void {432const configurationService = accessor.get(IConfigurationService);433configurationService.updateValue(LayoutSettings.ACTIVITY_BAR_LOCATION, ActivityBarPosition.TOP);434}435});436437registerAction2(class extends Action2 {438constructor() {439super({440id: 'workbench.action.activityBarLocation.bottom',441title: {442...localize2('positionActivityBarBottom', 'Move Activity Bar to Bottom'),443mnemonicTitle: localize({ key: 'miBottomActivityBar', comment: ['&& denotes a mnemonic'] }, "&&Bottom"),444},445shortTitle: localize('bottom', "Bottom"),446category: Categories.View,447toggled: ContextKeyExpr.equals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.BOTTOM),448menu: [{449id: MenuId.ActivityBarPositionMenu,450order: 3451}, {452id: MenuId.CommandPalette,453when: ContextKeyExpr.notEquals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.BOTTOM),454}]455});456}457run(accessor: ServicesAccessor): void {458const configurationService = accessor.get(IConfigurationService);459configurationService.updateValue(LayoutSettings.ACTIVITY_BAR_LOCATION, ActivityBarPosition.BOTTOM);460}461});462463registerAction2(class extends Action2 {464constructor() {465super({466id: 'workbench.action.activityBarLocation.hide',467title: {468...localize2('hideActivityBar', 'Hide Activity Bar'),469mnemonicTitle: localize({ key: 'miHideActivityBar', comment: ['&& denotes a mnemonic'] }, "&&Hidden"),470},471shortTitle: localize('hide', "Hidden"),472category: Categories.View,473toggled: ContextKeyExpr.equals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.HIDDEN),474menu: [{475id: MenuId.ActivityBarPositionMenu,476order: 4477}, {478id: MenuId.CommandPalette,479when: ContextKeyExpr.notEquals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.HIDDEN),480}]481});482}483run(accessor: ServicesAccessor): void {484const configurationService = accessor.get(IConfigurationService);485configurationService.updateValue(LayoutSettings.ACTIVITY_BAR_LOCATION, ActivityBarPosition.HIDDEN);486}487});488489MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {490submenu: MenuId.ActivityBarPositionMenu,491title: localize('positionActivituBar', "Activity Bar Position"),492group: '3_workbench_layout_move',493order: 2494});495496MenuRegistry.appendMenuItem(MenuId.ViewContainerTitleContext, {497submenu: MenuId.ActivityBarPositionMenu,498title: localize('positionActivituBar', "Activity Bar Position"),499when: ContextKeyExpr.or(500ContextKeyExpr.equals('viewContainerLocation', ViewContainerLocationToString(ViewContainerLocation.Sidebar)),501ContextKeyExpr.equals('viewContainerLocation', ViewContainerLocationToString(ViewContainerLocation.AuxiliaryBar))502),503group: '3_workbench_layout_move',504order: 1505});506507registerAction2(class extends SwitchCompositeViewAction {508constructor() {509super({510id: 'workbench.action.previousSideBarView',511title: localize2('previousSideBarView', 'Previous Primary Side Bar View'),512category: Categories.View,513f1: true514}, ViewContainerLocation.Sidebar, -1);515}516});517518registerAction2(class extends SwitchCompositeViewAction {519constructor() {520super({521id: 'workbench.action.nextSideBarView',522title: localize2('nextSideBarView', 'Next Primary Side Bar View'),523category: Categories.View,524f1: true525}, ViewContainerLocation.Sidebar, 1);526}527});528529registerAction2(530class FocusActivityBarAction extends Action2 {531constructor() {532super({533id: 'workbench.action.focusActivityBar',534title: localize2('focusActivityBar', 'Focus Activity Bar'),535category: Categories.View,536f1: true537});538}539540async run(accessor: ServicesAccessor): Promise<void> {541const layoutService = accessor.get(IWorkbenchLayoutService);542layoutService.focusPart(Parts.ACTIVITYBAR_PART);543}544});545546registerThemingParticipant((theme, collector) => {547548const activityBarActiveBorderColor = theme.getColor(ACTIVITY_BAR_ACTIVE_BORDER);549if (activityBarActiveBorderColor) {550collector.addRule(`551.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked .active-item-indicator:before {552border-left-color: ${activityBarActiveBorderColor};553}554`);555}556557const activityBarActiveFocusBorderColor = theme.getColor(ACTIVITY_BAR_ACTIVE_FOCUS_BORDER);558if (activityBarActiveFocusBorderColor) {559collector.addRule(`560.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:focus::before {561visibility: hidden;562}563564.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:focus .active-item-indicator:before {565visibility: visible;566border-left-color: ${activityBarActiveFocusBorderColor};567}568`);569}570571const activityBarActiveBackgroundColor = theme.getColor(ACTIVITY_BAR_ACTIVE_BACKGROUND);572if (activityBarActiveBackgroundColor) {573collector.addRule(`574.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked .active-item-indicator {575z-index: 0;576background-color: ${activityBarActiveBackgroundColor};577}578`);579}580581// Styling with Outline color (e.g. high contrast theme)582const outline = theme.getColor(activeContrastBorder);583if (outline) {584collector.addRule(`585.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item .action-label::before{586padding: 6px;587}588589.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active .action-label::before,590.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active:hover .action-label::before,591.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked .action-label::before,592.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:hover .action-label::before {593outline: 1px solid ${outline};594}595596.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:hover .action-label::before {597outline: 1px dashed ${outline};598}599600.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:focus .active-item-indicator:before {601border-left-color: ${outline};602}603`);604}605606// Styling without outline color607else {608const focusBorderColor = theme.getColor(focusBorder);609if (focusBorderColor) {610collector.addRule(`611.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:focus .active-item-indicator::before {612border-left-color: ${focusBorderColor};613}614`);615}616}617});618619620