Add selector tooltips

This commit is contained in:
Abdo 2025-08-14 09:00:02 +03:00
parent 4444942b46
commit c7a9471343
3 changed files with 5 additions and 2 deletions

View file

@ -32,4 +32,5 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
items={decks}
icon={mdiBookOutline}
keyCombination="Control+D"
tooltip={tr.qtMiscTargetDeckCtrlandd()}
/>

View file

@ -18,10 +18,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
items: Item[];
icon: IconData;
keyCombination: string;
tooltip: string;
onChange?: (item: Item) => void;
}
let { title, onChange, icon, items, selectedItem = $bindable(null), keyCombination }: Props = $props();
let { title, onChange, icon, items, selectedItem = $bindable(null), keyCombination, tooltip }: Props = $props();
let modal: Modal | null = $state(null);
let searchQuery = $state("");
@ -52,7 +53,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
});
</script>
<LabelButton on:click={openModal} class="chooser-button">
<LabelButton {tooltip} on:click={openModal} class="chooser-button">
{selectedItem?.name ?? "…"}
</LabelButton>

View file

@ -31,4 +31,5 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
items={notetypes}
icon={mdiNewspaper}
keyCombination="Control+N"
tooltip={tr.qtMiscChangeNoteTypeCtrlandn()}
/>