Skip to content

Commit 2fb22bc

Browse files
committed
Add close button to preset quick pick dialog
1 parent 4b26e97 commit 2fb22bc

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎apps/editor/src/views/panel/backend/message-handlers/handle-send-to-browser.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,18 @@ async function show_preset_quick_pick(params: {
439439
quick_pick.title = 'Recently Used Presets and Groups'
440440
quick_pick.matchOnDescription = true
441441

442+
const close_button = {
443+
iconPath: new vscode.ThemeIcon('close'),
444+
tooltip: 'Close'
445+
}
446+
quick_pick.buttons = [close_button]
447+
448+
quick_pick.onDidTriggerButton((button) => {
449+
if (button === close_button) {
450+
quick_pick.hide()
451+
}
452+
})
453+
442454
const last_selected_name = recent_names[0]
443455

444456
let last_selected_preset_name: string | undefined

0 commit comments

Comments
 (0)