From 14d7452f0c9ec00d07178c23d4dfeb30b7b921be Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 31 Oct 2023 16:29:43 +0100 Subject: [PATCH] feedback --- .../workbench/contrib/debug/browser/debugToolBar.ts | 12 +++++------- .../contrib/debug/browser/media/debugToolBar.css | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/contrib/debug/browser/debugToolBar.ts b/src/vs/workbench/contrib/debug/browser/debugToolBar.ts index 8822f3b8e1f..78536836e73 100644 --- a/src/vs/workbench/contrib/debug/browser/debugToolBar.ts +++ b/src/vs/workbench/contrib/debug/browser/debugToolBar.ts @@ -73,7 +73,6 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution { this.$el = dom.$('div.debug-toolbar'); this.$el.style.top = `${layoutService.mainContainerOffset.top}px`; - this.setHeight(); this.dragArea = dom.append(this.$el, dom.$('div.drag-area' + ThemeIcon.asCSSSelector(icons.debugGripper))); @@ -135,7 +134,6 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution { } if (e.affectsConfiguration(LayoutSettings.EDITOR_TABS_MODE) || e.affectsConfiguration(LayoutSettings.COMMAND_CENTER)) { this._yRange = undefined; - this.setHeight(); this.setYCoordinate(); } })); @@ -191,6 +189,11 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution { const position = parseFloat(left) / window.innerWidth; this.storageService.store(DEBUG_TOOLBAR_POSITION_KEY, position, StorageScope.PROFILE, StorageTarget.MACHINE); } + if (this.yCoordinate) { + this.storageService.store(DEBUG_TOOLBAR_Y_KEY, this.yCoordinate, StorageScope.PROFILE, StorageTarget.MACHINE); + } else { + this.storageService.remove(DEBUG_TOOLBAR_Y_KEY, StorageScope.PROFILE); + } } override updateStyles(): void { @@ -239,7 +242,6 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution { y = Math.max(yMin, Math.min(y, yMax)); this.$el.style.top = `${y}px`; this.yCoordinate = y; - this.storageService.store(DEBUG_TOOLBAR_Y_KEY, y, StorageScope.PROFILE, StorageTarget.MACHINE); } private _yRange: [number, number] | undefined; @@ -265,10 +267,6 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution { return this._yRange; } - private setHeight(): void { - this.$el.style.height = `${this.configurationService.getValue(LayoutSettings.EDITOR_TABS_MODE) === EditorTabsMode.NONE && this.configurationService.getValue(LayoutSettings.COMMAND_CENTER) !== true ? 26 : 32}px`; - } - private show(): void { if (this.isVisible) { this.setCoordinates(); diff --git a/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css b/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css index 64260286436..fbe36b38c1a 100644 --- a/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css +++ b/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css @@ -6,6 +6,7 @@ .monaco-workbench .debug-toolbar { position: absolute; z-index: 3000; + height: 26px; display: flex; padding-left: 7px; border-radius: 4px;