Skip to content

Commit 9fcefcb

Browse files
authored
Fix Activity Bar theme colors for Secondary Side Bar (microsoft#208764)
fix microsoft#208259
1 parent eead56a commit 9fcefcb

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { IStorageService } from 'vs/platform/storage/common/storage';
1414
import { contrastBorder } from 'vs/platform/theme/common/colorRegistry';
1515
import { IThemeService } from 'vs/platform/theme/common/themeService';
1616
import { ActiveAuxiliaryContext, AuxiliaryBarFocusContext } from 'vs/workbench/common/contextkeys';
17-
import { ACTIVITY_BAR_BADGE_BACKGROUND, ACTIVITY_BAR_BADGE_FOREGROUND, PANEL_ACTIVE_TITLE_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_DRAG_AND_DROP_BORDER, PANEL_INACTIVE_TITLE_FOREGROUND, SIDE_BAR_BACKGROUND, SIDE_BAR_BORDER, SIDE_BAR_FOREGROUND } from 'vs/workbench/common/theme';
17+
import { ACTIVITY_BAR_BADGE_BACKGROUND, ACTIVITY_BAR_BADGE_FOREGROUND, ACTIVITY_BAR_TOP_ACTIVE_BORDER, ACTIVITY_BAR_TOP_DRAG_AND_DROP_BORDER, ACTIVITY_BAR_TOP_FOREGROUND, ACTIVITY_BAR_TOP_INACTIVE_FOREGROUND, PANEL_ACTIVE_TITLE_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_DRAG_AND_DROP_BORDER, PANEL_INACTIVE_TITLE_FOREGROUND, SIDE_BAR_BACKGROUND, SIDE_BAR_BORDER, SIDE_BAR_FOREGROUND } from 'vs/workbench/common/theme';
1818
import { IViewDescriptorService } from 'vs/workbench/common/views';
1919
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
2020
import { ActivityBarPosition, IWorkbenchLayoutService, LayoutSettings, Parts, Position } from 'vs/workbench/services/layout/browser/layoutService';
@@ -169,12 +169,12 @@ export class AuxiliaryBarPart extends AbstractPaneCompositePart {
169169
colors: theme => ({
170170
activeBackgroundColor: theme.getColor(SIDE_BAR_BACKGROUND),
171171
inactiveBackgroundColor: theme.getColor(SIDE_BAR_BACKGROUND),
172-
activeBorderBottomColor: theme.getColor(PANEL_ACTIVE_TITLE_BORDER),
173-
activeForegroundColor: theme.getColor(PANEL_ACTIVE_TITLE_FOREGROUND),
174-
inactiveForegroundColor: theme.getColor(PANEL_INACTIVE_TITLE_FOREGROUND),
172+
get activeBorderBottomColor() { return $this.getCompositeBarPosition() === CompositeBarPosition.TITLE ? theme.getColor(PANEL_ACTIVE_TITLE_BORDER) : theme.getColor(ACTIVITY_BAR_TOP_ACTIVE_BORDER); },
173+
get activeForegroundColor() { return $this.getCompositeBarPosition() === CompositeBarPosition.TITLE ? theme.getColor(PANEL_ACTIVE_TITLE_FOREGROUND) : theme.getColor(ACTIVITY_BAR_TOP_FOREGROUND); },
174+
get inactiveForegroundColor() { return $this.getCompositeBarPosition() === CompositeBarPosition.TITLE ? theme.getColor(PANEL_INACTIVE_TITLE_FOREGROUND) : theme.getColor(ACTIVITY_BAR_TOP_INACTIVE_FOREGROUND); },
175175
badgeBackground: theme.getColor(ACTIVITY_BAR_BADGE_BACKGROUND),
176176
badgeForeground: theme.getColor(ACTIVITY_BAR_BADGE_FOREGROUND),
177-
dragAndDropBorder: theme.getColor(PANEL_DRAG_AND_DROP_BORDER)
177+
get dragAndDropBorder() { return $this.getCompositeBarPosition() === CompositeBarPosition.TITLE ? theme.getColor(PANEL_DRAG_AND_DROP_BORDER) : theme.getColor(ACTIVITY_BAR_TOP_DRAG_AND_DROP_BORDER); }
178178
}),
179179
compact: true
180180
};
@@ -205,6 +205,7 @@ export class AuxiliaryBarPart extends AbstractPaneCompositePart {
205205
return this.configurationService.getValue<ActivityBarPosition>(LayoutSettings.ACTIVITY_BAR_LOCATION) !== ActivityBarPosition.HIDDEN;
206206
}
207207

208+
// TODO@benibenj chache this
208209
protected getCompositeBarPosition(): CompositeBarPosition {
209210
const activityBarPosition = this.configurationService.getValue<ActivityBarPosition>(LayoutSettings.ACTIVITY_BAR_LOCATION);
210211
switch (activityBarPosition) {

src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,26 @@
5151
left: 6px; /* place icon in center */
5252
}
5353

54-
.monaco-workbench .part.auxiliarybar > .header-or-footer > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item.checked:not(:focus) .active-item-indicator:before,
55-
.monaco-workbench .part.auxiliarybar > .header-or-footer > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item.checked.clicked:focus .active-item-indicator:before,
5654
.monaco-workbench .part.auxiliarybar > .title > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item.checked:not(:focus) .active-item-indicator:before,
5755
.monaco-workbench .part.auxiliarybar > .title > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item.checked.clicked:focus .active-item-indicator:before {
56+
border-top-color: var(--vscode-panelTitle-activeBorder) !important;
57+
}
58+
59+
.monaco-workbench .part.auxiliarybar > .header-or-footer > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item.checked:not(:focus) .active-item-indicator:before,
60+
.monaco-workbench .part.auxiliarybar > .header-or-footer > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item.checked.clicked:focus .active-item-indicator:before {
5861
border-top-color: var(--vscode-activityBarTop-activeBorder) !important;
5962
}
6063

61-
.monaco-workbench .part.auxiliarybar > .header-or-footer > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item:hover .action-label,
62-
.monaco-workbench .part.auxiliarybar > .header-or-footer > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item:focus .action-label,
6364
.monaco-workbench .part.auxiliarybar > .title > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item:hover .action-label,
6465
.monaco-workbench .part.auxiliarybar > .title > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item:focus .action-label {
6566
color: var(--vscode-sideBarTitle-foreground) !important;
6667
}
6768

69+
.monaco-workbench .part.auxiliarybar > .header-or-footer > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item:hover .action-label,
70+
.monaco-workbench .part.auxiliarybar > .header-or-footer > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item:focus .action-label {
71+
color: var(--vscode-activityBarTop-foreground) !important;
72+
}
73+
6874
.monaco-workbench .part.auxiliarybar > .header-or-footer > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item.checked .action-label,
6975
.monaco-workbench .part.auxiliarybar > .header-or-footer > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item:hover .action-label,
7076
.monaco-workbench .part.auxiliarybar > .title > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item.checked .action-label,

0 commit comments

Comments
 (0)