Fix ShortcutLabel drawing of consecutive key labels

This commit is contained in:
Keavon Chambers
2025-12-04 22:04:37 -08:00
parent 8ca546c164
commit 74d9c911bd
5 changed files with 50 additions and 25 deletions

View File

@@ -33,7 +33,7 @@
export let tabMinWidths = false;
export let tabCloseButtons = false;
export let tabLabels: { name: string; unsaved?: boolean; tooltipDescription?: string; tooltipShortcut?: string }[];
export let tabLabels: { name: string; unsaved?: boolean; tooltipLabel?: string; tooltipDescription?: string; tooltipShortcut?: string }[];
export let tabActiveIndex: number;
export let panelType: PanelType | undefined = undefined;
export let clickAction: ((index: number) => void) | undefined = undefined;
@@ -67,7 +67,7 @@
<LayoutRow
class="tab"
classes={{ active: tabIndex === tabActiveIndex }}
tooltipLabel={tabLabel.name}
tooltipLabel={tabLabel.tooltipLabel}
tooltipDescription={tabLabel.tooltipDescription}
on:click={(e) => {
e.stopPropagation();

View File

@@ -33,7 +33,7 @@
if (!editor.handle.inDevelopmentMode()) return { name, unsaved };
const tooltipDescription = `Document ID: ${doc.id}`;
return { name, unsaved, tooltipDescription };
return { name, unsaved, tooltipLabel: name, tooltipDescription };
});
const editor = getContext<Editor>("editor");