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

View file

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