mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-15 07:28:05 +00:00
@@ -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<boolean>(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<boolean>(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<boolean>(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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user