提交 ceb8da0b 编写于 作者: B Benjamin Pasero

tabs - disable badge decorations for compact sticky tabs that have fixed width

上级 ea51fb1b
......@@ -1133,12 +1133,14 @@ export class TabsTitleControl extends TitleControl {
// or their first character of the name otherwise
let name: string | undefined;
let forceLabel = false;
let forceDisableBadgeDecorations = false;
let description: string;
if (options.pinnedTabSizing === 'compact' && this.group.isSticky(index)) {
const isShowingIcons = options.showIcons && options.hasIcons;
name = isShowingIcons ? '' : tabLabel.name?.charAt(0).toUpperCase();
description = '';
forceLabel = true;
forceDisableBadgeDecorations = true; // not enough space when sticky tabs are compact
} else {
name = tabLabel.name;
description = tabLabel.description || '';
......@@ -1157,7 +1159,16 @@ export class TabsTitleControl extends TitleControl {
// Label
tabLabelWidget.setResource(
{ name, description, resource: EditorResourceAccessor.getOriginalUri(editor, { supportSideBySide: SideBySideEditor.BOTH }) },
{ title, extraClasses: ['tab-label'], italic: !this.group.isPinned(editor), forceLabel, fileDecorations: { colors: Boolean(options.decorations?.colors), badges: Boolean(options.decorations?.badges) } }
{
title,
extraClasses: ['tab-label'],
italic: !this.group.isPinned(editor),
forceLabel,
fileDecorations: {
colors: Boolean(options.decorations?.colors),
badges: forceDisableBadgeDecorations ? false : Boolean(options.decorations?.badges)
}
}
);
// Tests helper
......
......@@ -198,7 +198,7 @@ class SelectFileIconThemeAction extends AbstractIconThemeAction {
super(id, label, quickInputService, extensionGalleryService, viewletService);
}
protected builtInEntry: QuickPickInput<ThemeItem> = { id: '', label: localize('noIconThemeLabel', 'None'), description: localize('noIconThemeDesc', 'Disable file icons') };
protected builtInEntry: QuickPickInput<ThemeItem> = { id: '', label: localize('noIconThemeLabel', 'None'), description: localize('noIconThemeDesc', 'Disable File Icons') };
protected installMessage = localize('installIconThemes', "Install Additional File Icon Themes...");
protected placeholderMessage = localize('themes.selectIconTheme', "Select File Icon Theme");
protected marketplaceTag = 'tag:icon-theme';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册