Skip to content

Commit 8e67cd2

Browse files
committed
1 parent 1801b1c commit 8e67cd2

5 files changed

Lines changed: 24 additions & 19 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
1515
import { IDisposable, toDisposable, DisposableStore, Disposable } from 'vs/base/common/lifecycle';
1616
import { ToggleActivityBarVisibilityAction, ToggleMenuBarAction } from 'vs/workbench/browser/actions/layoutActions';
1717
import { IThemeService, IColorTheme } from 'vs/platform/theme/common/themeService';
18-
import { ACTIVITY_BAR_BACKGROUND, ACTIVITY_BAR_BORDER, ACTIVITY_BAR_FOREGROUND, ACTIVITY_BAR_ACTIVE_BORDER, ACTIVITY_BAR_BADGE_BACKGROUND, ACTIVITY_BAR_BADGE_FOREGROUND, ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND, ACTIVITY_BAR_INACTIVE_FOREGROUND, ACTIVITY_BAR_ACTIVE_BACKGROUND } from 'vs/workbench/common/theme';
18+
import { 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 } from 'vs/workbench/common/theme';
1919
import { contrastBorder } from 'vs/platform/theme/common/colorRegistry';
2020
import { CompositeBar, ICompositeBarItem, CompositeDragAndDrop } from 'vs/workbench/browser/parts/compositeBar';
2121
import { Dimension, addClass, removeNode, createCSSRule, asCSSUrl } from 'vs/base/browser/dom';
@@ -437,7 +437,7 @@ export class ActivitybarPart extends Part implements IActivityBarService {
437437
activeBackground: theme.getColor(ACTIVITY_BAR_ACTIVE_BACKGROUND),
438438
badgeBackground: theme.getColor(ACTIVITY_BAR_BADGE_BACKGROUND),
439439
badgeForeground: theme.getColor(ACTIVITY_BAR_BADGE_FOREGROUND),
440-
dragAndDropBackground: theme.getColor(ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND),
440+
dragAndDropBorder: theme.getColor(ACTIVITY_BAR_DRAG_AND_DROP_BORDER),
441441
activeBackgroundColor: undefined, inactiveBackgroundColor: undefined, activeBorderBottomColor: undefined,
442442
};
443443
}

src/vs/workbench/browser/parts/compositeBarActions.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export interface ICompositeBarColors {
119119
inactiveForegroundColor?: Color;
120120
badgeBackground?: Color;
121121
badgeForeground?: Color;
122-
dragAndDropBackground?: Color;
122+
dragAndDropBorder?: Color;
123123
}
124124

125125
export interface IActivityActionViewItemOptions extends IBaseActionViewItemOptions {
@@ -169,16 +169,14 @@ export class ActivityActionViewItem extends BaseActionViewItem {
169169
this.label.style.color = foreground ? foreground.toString() : '';
170170
this.label.style.backgroundColor = '';
171171
}
172-
173-
const dragColor = colors.activeBackgroundColor || colors.activeForegroundColor;
174-
this.container.style.setProperty('--insert-border-color', dragColor ? dragColor.toString() : '');
175172
} else {
176173
const foreground = this._action.checked ? colors.activeForegroundColor : colors.inactiveForegroundColor;
177174
const borderBottomColor = this._action.checked ? colors.activeBorderBottomColor : null;
178175
this.label.style.color = foreground ? foreground.toString() : '';
179176
this.label.style.borderBottomColor = borderBottomColor ? borderBottomColor.toString() : '';
180-
this.container.style.setProperty('--insert-border-color', colors.activeForegroundColor ? colors.activeForegroundColor.toString() : '');
181177
}
178+
179+
this.container.style.setProperty('--insert-border-color', colors.dragAndDropBorder ? colors.dragAndDropBorder.toString() : '');
182180
}
183181

184182
// Badge

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
2020
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
2121
import { ClosePanelAction, PanelActivityAction, ToggleMaximizedPanelAction, TogglePanelAction, PlaceHolderPanelActivityAction, PlaceHolderToggleCompositePinnedAction, PositionPanelActionConfigs, SetPanelPositionAction } from 'vs/workbench/browser/parts/panel/panelActions';
2222
import { IThemeService, registerThemingParticipant, IColorTheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
23-
import { PANEL_BACKGROUND, PANEL_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_INACTIVE_TITLE_FOREGROUND, PANEL_ACTIVE_TITLE_BORDER, PANEL_DRAG_AND_DROP_BACKGROUND, PANEL_INPUT_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND } from 'vs/workbench/common/theme';
23+
import { PANEL_BACKGROUND, PANEL_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_INACTIVE_TITLE_FOREGROUND, PANEL_ACTIVE_TITLE_BORDER, PANEL_INPUT_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND, PANEL_DRAG_AND_DROP_BORDER } from 'vs/workbench/common/theme';
2424
import { activeContrastBorder, focusBorder, contrastBorder, editorBackground, badgeBackground, badgeForeground } from 'vs/platform/theme/common/colorRegistry';
2525
import { CompositeBar, ICompositeBarItem, CompositeDragAndDrop } from 'vs/workbench/browser/parts/compositeBar';
2626
import { ToggleCompositePinnedAction } from 'vs/workbench/browser/parts/compositeBarActions';
@@ -176,7 +176,7 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
176176
inactiveForegroundColor: theme.getColor(PANEL_INACTIVE_TITLE_FOREGROUND),
177177
badgeBackground: theme.getColor(badgeBackground),
178178
badgeForeground: theme.getColor(badgeForeground),
179-
dragAndDropBackground: theme.getColor(PANEL_DRAG_AND_DROP_BACKGROUND)
179+
dragAndDropBorder: theme.getColor(PANEL_DRAG_AND_DROP_BORDER)
180180
})
181181
}));
182182

src/vs/workbench/browser/parts/views/viewPaneContainer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as nls from 'vs/nls';
88
import { Event, Emitter } from 'vs/base/common/event';
99
import { ColorIdentifier, activeContrastBorder, foreground } from 'vs/platform/theme/common/colorRegistry';
1010
import { attachStyler, IColorMapping, attachButtonStyler, attachLinkStyler, attachProgressBarStyler } from 'vs/platform/theme/common/styler';
11-
import { SIDE_BAR_DRAG_AND_DROP_BACKGROUND, SIDE_BAR_SECTION_HEADER_FOREGROUND, SIDE_BAR_SECTION_HEADER_BACKGROUND, SIDE_BAR_SECTION_HEADER_BORDER, PANEL_BACKGROUND, SIDE_BAR_BACKGROUND, PANEL_SECTION_HEADER_FOREGROUND, PANEL_SECTION_HEADER_BACKGROUND, PANEL_SECTION_HEADER_BORDER, PANEL_DRAG_AND_DROP_BACKGROUND, PANEL_SECTION_BORDER } from 'vs/workbench/common/theme';
11+
import { SIDE_BAR_DRAG_AND_DROP_BACKGROUND, SIDE_BAR_SECTION_HEADER_FOREGROUND, SIDE_BAR_SECTION_HEADER_BACKGROUND, SIDE_BAR_SECTION_HEADER_BORDER, PANEL_BACKGROUND, SIDE_BAR_BACKGROUND, PANEL_SECTION_HEADER_FOREGROUND, PANEL_SECTION_HEADER_BACKGROUND, PANEL_SECTION_HEADER_BORDER, PANEL_SECTION_DRAG_AND_DROP_BACKGROUND, PANEL_SECTION_BORDER } from 'vs/workbench/common/theme';
1212
import { append, $, trackFocus, toggleClass, EventType, isAncestor, Dimension, addDisposableListener, removeClass, addClass, createCSSRule, asCSSUrl, addClasses } from 'vs/base/browser/dom';
1313
import { IDisposable, combinedDisposable, dispose, toDisposable, Disposable, DisposableStore } from 'vs/base/common/lifecycle';
1414
import { firstIndex } from 'vs/base/common/arrays';
@@ -663,7 +663,7 @@ class ViewPaneDropOverlay extends Themable {
663663
protected updateStyles(): void {
664664

665665
// Overlay drop background
666-
this.overlay.style.backgroundColor = this.getColor(this.location === ViewContainerLocation.Panel ? PANEL_DRAG_AND_DROP_BACKGROUND : SIDE_BAR_DRAG_AND_DROP_BACKGROUND) || '';
666+
this.overlay.style.backgroundColor = this.getColor(this.location === ViewContainerLocation.Panel ? PANEL_SECTION_DRAG_AND_DROP_BACKGROUND : SIDE_BAR_DRAG_AND_DROP_BACKGROUND) || '';
667667

668668
// Overlay contrast border (if any)
669669
const activeContrastBorderColor = this.getColor(activeContrastBorder);
@@ -1316,7 +1316,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer {
13161316
headerForeground: isPanel ? PANEL_SECTION_HEADER_FOREGROUND : SIDE_BAR_SECTION_HEADER_FOREGROUND,
13171317
headerBackground: isPanel ? PANEL_SECTION_HEADER_BACKGROUND : SIDE_BAR_SECTION_HEADER_BACKGROUND,
13181318
headerBorder: isPanel ? PANEL_SECTION_HEADER_BORDER : SIDE_BAR_SECTION_HEADER_BORDER,
1319-
dropBackground: isPanel ? PANEL_DRAG_AND_DROP_BACKGROUND : SIDE_BAR_DRAG_AND_DROP_BACKGROUND,
1319+
dropBackground: isPanel ? PANEL_SECTION_DRAG_AND_DROP_BACKGROUND : SIDE_BAR_DRAG_AND_DROP_BACKGROUND,
13201320
leftBorder: isPanel ? PANEL_SECTION_BORDER : undefined
13211321
}, pane);
13221322
const disposable = combinedDisposable(pane, onDidFocus, onDidChangeTitleArea, paneStyler, onDidChange, onDidChangeVisibility);

src/vs/workbench/common/theme.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,18 @@ export const PANEL_INPUT_BORDER = registerColor('panelInput.border', {
289289
hc: null
290290
}, nls.localize('panelInputBorder', "Input box border for inputs in the panel."));
291291

292-
export const PANEL_DRAG_AND_DROP_BACKGROUND = registerColor('panel.dropBackground', {
292+
export const PANEL_DRAG_AND_DROP_BORDER = registerColor('panel.dropBorder', {
293+
dark: PANEL_ACTIVE_TITLE_FOREGROUND,
294+
light: PANEL_ACTIVE_TITLE_FOREGROUND,
295+
hc: PANEL_ACTIVE_TITLE_FOREGROUND,
296+
}, nls.localize('panelDragAndDropBorder', "Drag and drop feedback color for the panel titles. Panels are shown below the editor area and contain views like output and integrated terminal."));
297+
298+
299+
export const PANEL_SECTION_DRAG_AND_DROP_BACKGROUND = registerColor('panelSection.dropBackground', {
293300
dark: EDITOR_DRAG_AND_DROP_BACKGROUND,
294301
light: EDITOR_DRAG_AND_DROP_BACKGROUND,
295302
hc: EDITOR_DRAG_AND_DROP_BACKGROUND,
296-
}, nls.localize('panelDragAndDropBackground', "Drag and drop feedback color for the panel sections. The color should have transparency so that the panel sections can still shine through. Panels are shown below the editor area and contain views like output and integrated terminal."));
303+
}, nls.localize('panelSectionDragAndDropBackground', "Drag and drop feedback color for the panel sections. The color should have transparency so that the panel sections can still shine through. Panels are shown below the editor area and contain views like output and integrated terminal."));
297304

298305
export const PANEL_SECTION_HEADER_BACKGROUND = registerColor('panelSectionHeader.background', {
299306
dark: Color.fromHex('#808080').transparent(0.2),
@@ -432,11 +439,11 @@ export const ACTIVITY_BAR_ACTIVE_BACKGROUND = registerColor('activityBar.activeB
432439
hc: null
433440
}, nls.localize('activityBarActiveBackground', "Activity bar background 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."));
434441

435-
export const ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND = registerColor('activityBar.dropBackground', {
436-
dark: Color.white.transparent(0.12),
437-
light: Color.white.transparent(0.12),
438-
hc: Color.white.transparent(0.12),
439-
}, nls.localize('activityBarDragAndDropBackground', "Drag and drop feedback color for the activity bar items. The color should have transparency so that the activity bar entries can still shine through. The activity bar is showing on the far left or right and allows to switch between views of the side bar."));
442+
export const ACTIVITY_BAR_DRAG_AND_DROP_BORDER = registerColor('activityBar.dropBorder', {
443+
dark: ACTIVITY_BAR_FOREGROUND,
444+
light: ACTIVITY_BAR_FOREGROUND,
445+
hc: ACTIVITY_BAR_FOREGROUND,
446+
}, nls.localize('activityBarDragAndDropBorder', "Drag and drop feedback color for the activity bar items. The activity bar is showing on the far left or right and allows to switch between views of the side bar."));
440447

441448
export const ACTIVITY_BAR_BADGE_BACKGROUND = registerColor('activityBarBadge.background', {
442449
dark: '#007ACC',

0 commit comments

Comments
 (0)