diff --git a/src/vs/base/browser/ui/selectBox/selectBoxCustom.css b/src/vs/base/browser/ui/selectBox/selectBoxCustom.css index 117c5a6cb2a..583a1e2b5f7 100644 --- a/src/vs/base/browser/ui/selectBox/selectBoxCustom.css +++ b/src/vs/base/browser/ui/selectBox/selectBoxCustom.css @@ -45,7 +45,7 @@ padding: 5px 6px; } -/* Remove focus ring around the list */ +/* Remove list-level focus ring — individual rows show their own focus indicators */ .monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list:focus::before { outline: 0 !important; } diff --git a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts index ec6ce9a51bb..ec1ac45cc05 100644 --- a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts +++ b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts @@ -75,6 +75,7 @@ class SelectListRenderer implements IListRenderer { + if (element.isSeparator) { + return localize('selectBoxSeparator', "separator"); + } + let label = element.text; if (element.detail) { label += `. ${element.detail}`; diff --git a/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts b/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts index 4b74c19bf58..1028ec8992e 100644 --- a/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts +++ b/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts @@ -198,12 +198,14 @@ export class StartDebugActionViewItem extends BaseActionViewItem { const inWorkspace = this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE; let lastGroup: string | undefined; const disabledIdxs: number[] = []; + const separatorIdxs: number[] = []; manager.getAllConfigurations().forEach(({ launch, name, presentation }) => { if (lastGroup !== presentation?.group) { lastGroup = presentation?.group; if (this.debugOptions.length) { this.debugOptions.push({ label: SeparatorSelectOption.text, handler: () => Promise.resolve(false) }); disabledIdxs.push(this.debugOptions.length - 1); + separatorIdxs.push(this.debugOptions.length - 1); } } if (name === manager.selectedConfiguration.name && launch === manager.selectedConfiguration.launch) { @@ -239,6 +241,7 @@ export class StartDebugActionViewItem extends BaseActionViewItem { this.debugOptions.push({ label: SeparatorSelectOption.text, handler: () => Promise.resolve(false) }); disabledIdxs.push(this.debugOptions.length - 1); + separatorIdxs.push(this.debugOptions.length - 1); this.providers.forEach(p => { @@ -268,7 +271,7 @@ export class StartDebugActionViewItem extends BaseActionViewItem { this.selectBox.setOptions(this.debugOptions.map((data, index): ISelectOptionItem => ({ text: data.label, isDisabled: disabledIdxs.indexOf(index) !== -1, - isSeparator: data.label === SeparatorSelectOption.text, + isSeparator: separatorIdxs.indexOf(index) !== -1, })), this.selected); }