Skip to content

Commit 1424f2b

Browse files
committed
pinned tabs - flip default to "shrink"
1 parent c3c8126 commit 1424f2b

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const DEFAULT_EDITOR_PART_OPTIONS: IEditorPartOptions = {
3030
highlightModifiedTabs: false,
3131
tabCloseButton: 'right',
3232
tabSizing: 'fit',
33-
pinnedTabSizing: 'compact',
33+
pinnedTabSizing: 'shrink',
3434
titleScrollbarSizing: 'default',
3535
focusRecentEditorAfterClose: true,
3636
showIcons: true,

src/vs/workbench/browser/parts/editor/tabsTitleControl.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -585,11 +585,7 @@ export class TabsTitleControl extends TitleControl {
585585

586586
const tabActionRunner = new EditorCommandsContextActionRunner({ groupId: this.group.id, editorIndex: index });
587587

588-
const tabActionBar = new ActionBar(tabActionsContainer, {
589-
ariaLabel: localize('ariaLabelTabActions', "Tab actions"),
590-
actionRunner: tabActionRunner,
591-
592-
});
588+
const tabActionBar = new ActionBar(tabActionsContainer, { ariaLabel: localize('ariaLabelTabActions', "Tab actions"), actionRunner: tabActionRunner, });
593589
tabActionBar.onDidBeforeRun(e => {
594590
if (e.action.id === this.closeEditorAction.id) {
595591
this.blockRevealActiveTabOnce();
@@ -1101,7 +1097,7 @@ export class TabsTitleControl extends TitleControl {
11011097
let name: string | undefined;
11021098
let forceLabel = false;
11031099
let description: string;
1104-
if (this.group.isSticky(index) && options.pinnedTabSizing === 'compact') {
1100+
if (options.pinnedTabSizing === 'compact' && this.group.isSticky(index)) {
11051101
const isShowingIcons = options.showIcons && options.hasIcons;
11061102
name = isShowingIcons ? '' : tabLabel.name?.charAt(0).toUpperCase();
11071103
description = '';
@@ -1287,7 +1283,7 @@ export class TabsTitleControl extends TitleControl {
12871283
//
12881284
// Synopsis
12891285
// - allTabsWidth: sum of all tab widths
1290-
// - stickyTabsWidth: sum of all sticky tab widths (unless they inherit look from other tabs)
1286+
// - stickyTabsWidth: sum of all sticky tab widths (unless `pinnedTabSizing: normal`)
12911287
// - visibleContainerWidth: size of tab container
12921288
// - availableContainerWidth: size of tab container minus size of sticky tabs
12931289
//
@@ -1306,7 +1302,7 @@ export class TabsTitleControl extends TitleControl {
13061302
// Compute width of sticky tabs depending on pinned tab sizing
13071303
// - compact: sticky-tabs * TAB_SIZES.compact
13081304
// - shrink: sticky-tabs * TAB_SIZES.shrink
1309-
// - inherit: 0 (sticky tabs inherit look and feel from non-sticky tabs)
1305+
// - normal: 0 (sticky tabs inherit look and feel from non-sticky tabs)
13101306
let stickyTabsWidth = 0;
13111307
if (this.group.stickyCount > 0) {
13121308
let stickyTabWidth = 0;

src/vs/workbench/browser/workbench.contribution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ import { workbenchConfigurationNodeBase } from 'vs/workbench/common/configuratio
8989
'workbench.editor.pinnedTabSizing': {
9090
'type': 'string',
9191
'enum': ['compact', 'shrink', 'normal'],
92-
'default': 'compact',
92+
'default': 'shrink',
9393
'enumDescriptions': [
9494
nls.localize('workbench.editor.pinnedTabSizing.compact', "A pinned tab will show in a compact form with only icon or first letter of the editor name."),
9595
nls.localize('workbench.editor.pinnedTabSizing.shrink', "A pinned tab shrinks to a compact fixed size showing parts of the editor name."),

0 commit comments

Comments
 (0)