diff --git a/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.ts b/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.ts index 82738560d38..d32082b4e12 100644 --- a/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.ts +++ b/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.ts @@ -151,7 +151,7 @@ export class AuxiliaryBarPart extends AbstractPaneCompositePart { private onDidChangeAutoHideViewContainers(e: { before: number; after: number }): void { // Only update if auto-hide is enabled and composite bar would show const autoHide = this.configurationService.getValue(LayoutSettings.ACTIVITY_BAR_AUTO_HIDE); - if (autoHide && (this.configuration.position !== ActivityBarPosition.HIDDEN)) { + if (autoHide && (this.configuration.position === ActivityBarPosition.TOP || this.configuration.position === ActivityBarPosition.BOTTOM)) { const visibleBefore = e.before > 1; const visibleAfter = e.after > 1; if (visibleBefore !== visibleAfter) { @@ -266,14 +266,17 @@ export class AuxiliaryBarPart extends AbstractPaneCompositePart { } // Check if auto-hide is enabled and there's only one visible view container - const autoHide = this.configurationService.getValue(LayoutSettings.ACTIVITY_BAR_AUTO_HIDE); - if (autoHide) { - // Use visible composite count from the composite bar if available (considers pinned state), - // otherwise fall back to the tracker's count (based on active view descriptors). - // Note: We access paneCompositeBar directly to avoid circular calls with getVisiblePaneCompositeIds() - const visibleCount = this.visibleViewContainersTracker.visibleCount; - if (visibleCount <= 1) { - return false; + // while the activity bar is configured to be top or bottom. + if (this.configuration.position === ActivityBarPosition.TOP || this.configuration.position === ActivityBarPosition.BOTTOM) { + const autoHide = this.configurationService.getValue(LayoutSettings.ACTIVITY_BAR_AUTO_HIDE); + if (autoHide) { + // Use visible composite count from the composite bar if available (considers pinned state), + // otherwise fall back to the tracker's count (based on active view descriptors). + // Note: We access paneCompositeBar directly to avoid circular calls with getVisiblePaneCompositeIds() + const visibleCount = this.visibleViewContainersTracker.visibleCount; + if (visibleCount <= 1) { + return false; + } } }