From 149f31ed01fa46841d27dca9318e28066af26335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moreno?= Date: Thu, 10 Sep 2020 15:22:07 +0200 Subject: [PATCH] fixes #104047 --- src/vs/workbench/contrib/scm/browser/media/scm.css | 10 ++++++++++ .../workbench/contrib/scm/browser/scmViewPane.ts | 14 ++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/scm/browser/media/scm.css b/src/vs/workbench/contrib/scm/browser/media/scm.css index b1838de8f21c6..7aa1ad2802444 100644 --- a/src/vs/workbench/contrib/scm/browser/media/scm.css +++ b/src/vs/workbench/contrib/scm/browser/media/scm.css @@ -8,6 +8,16 @@ position: relative; } +.scm-overflow-widgets-container { + position: absolute; + top: 0; + left: 0; + width: 0; + height: 0; + overflow: visible; + z-index: 5000; +} + .scm-view .monaco-tl-contents > div { margin-right: 12px; overflow: hidden; diff --git a/src/vs/workbench/contrib/scm/browser/scmViewPane.ts b/src/vs/workbench/contrib/scm/browser/scmViewPane.ts index 7091161780781..560ad4c2b82c0 100644 --- a/src/vs/workbench/contrib/scm/browser/scmViewPane.ts +++ b/src/vs/workbench/contrib/scm/browser/scmViewPane.ts @@ -137,6 +137,7 @@ class InputRenderer implements ICompressibleTreeRenderer void, @IInstantiationService private instantiationService: IInstantiationService, ) { } @@ -147,7 +148,7 @@ class InputRenderer implements ICompressibleTreeRenderer toggleClass(this.listContainer, 'show-actions', this.configurationService.getValue('scm.alwaysShowActions')); this._register(Event.filter(this.configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.alwaysShowActions'))(updateActionsVisibility)); updateActionsVisibility(); @@ -1606,7 +1611,7 @@ export class SCMViewPane extends ViewPane { this._register(this.scmViewService.onDidChangeVisibleRepositories(() => this.updateActions())); - this.inputRenderer = this.instantiationService.createInstance(InputRenderer, this.layoutCache, (input, height) => this.tree.updateElementHeight(input, height)); + this.inputRenderer = this.instantiationService.createInstance(InputRenderer, this.layoutCache, overflowWidgetsDomNode, (input, height) => this.tree.updateElementHeight(input, height)); const delegate = new ListDelegate(this.inputRenderer); const actionViewItemProvider = (action: IAction) => this.getActionViewItem(action); @@ -1643,7 +1648,6 @@ export class SCMViewPane extends ViewPane { filter, sorter, keyboardNavigationLabelProvider, - transformOptimization: false, overrideStyles: { listBackground: this.viewDescriptorService.getViewLocationById(this.id) === ViewContainerLocation.Sidebar ? SIDE_BAR_BACKGROUND : PANEL_BACKGROUND }, @@ -1656,6 +1660,8 @@ export class SCMViewPane extends ViewPane { this._register(this.tree.onDidScroll(this.inputRenderer.clearValidation, this.inputRenderer)); this._register(this.tree); + append(this.listContainer, overflowWidgetsDomNode); + let viewMode = this.configurationService.getValue<'tree' | 'list'>('scm.defaultViewMode') === 'list' ? ViewModelMode.List : ViewModelMode.Tree; const storageMode = this.storageService.get(`scm.viewMode`, StorageScope.WORKSPACE) as ViewModelMode;