diff --git a/src/vs/editor/contrib/referenceSearch/browser/media/referencesWidget.css b/src/vs/editor/contrib/referenceSearch/browser/media/referencesWidget.css index 5b31614155397..5c8996336c3cd 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/media/referencesWidget.css +++ b/src/vs/editor/contrib/referenceSearch/browser/media/referencesWidget.css @@ -37,21 +37,18 @@ } .monaco-editor .reference-zone-widget .ref-tree .reference-file { - display: flex; - justify-content: space-between; - align-items: center; + display: inline-flex; + width: 100%; + height: 100%; } -.monaco-editor .reference-zone-widget .monaco-count-badge { - margin-right: .5em; - height: 15px; - padding: 0 .5em .5em .5em +.monaco-editor .reference-zone-widget .ref-tree .reference-file .count { + margin-right: 12px; + margin-left: auto; } /* High Contrast Theming */ .monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file { font-weight: bold; - display: flex; - justify-content: space-between; } diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index ce7638670eb62..0a48d7d245735 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -355,11 +355,15 @@ class FileReferencesTemplate { const parent = document.createElement('div'); dom.addClass(parent, 'reference-file'); container.appendChild(parent); - this.file = new FileLabel(parent, URI.parse('no:file'), this._contextService, this._environmentService); - this.badge = new CountBadge(parent); + + this.badge = new CountBadge($('.count').appendTo(parent).getHTMLElement()); const styler = attachBadgeStyler(this.badge, themeService); - this.dispose = () => styler.dispose(); + + this.dispose = () => { + this.file.dispose(); + styler.dispose(); + }; } set(element: FileReferences) {