diff --git a/qt/aqt/addcards.py b/qt/aqt/addcards.py index c564340a4..63f38829f 100644 --- a/qt/aqt/addcards.py +++ b/qt/aqt/addcards.py @@ -68,21 +68,31 @@ class AddCards(QDialog): editor.web.eval( f""" -const notetypeChooser = editorToolbar.labelButton({{ - label: `Choose note type`, - onClick: () => bridgeCommand("choosenotetype"), - disables: false, +const notetypeChooser = editorToolbar.withLabel({{ + label: `{tr.notetypes_type()}`, + className: "flex-grow-1", + button: editorToolbar.labelButton({{ + label: `Choose note type`, + className: "flex-grow-1", + onClick: () => bridgeCommand("choosenotetype"), + disables: false, + }}) }}); -const deckChooser = editorToolbar.labelButton({{ - label: `Choose deck`, - onClick: () => bridgeCommand("choosedeck"), - disables: false, +const deckChooser = editorToolbar.withLabel({{ + label: `{tr.decks_deck()}`, + className: "flex-grow-1", + button: editorToolbar.labelButton({{ + label: `Choose deck`, + className: "flex-grow-1", + onClick: () => bridgeCommand("choosedeck"), + disables: false, + }}) }}); $editorToolbar.insertButton(editorToolbar.buttonGroup({{ id: "choosers", - fullWidth: true, + className: "flex-basis-100", items: [notetypeChooser, deckChooser], }}), 0); """ diff --git a/ts/editor-toolbar/ButtonGroup.d.ts b/ts/editor-toolbar/ButtonGroup.d.ts index cbf4376ff..f5f273e45 100644 --- a/ts/editor-toolbar/ButtonGroup.d.ts +++ b/ts/editor-toolbar/ButtonGroup.d.ts @@ -6,4 +6,5 @@ export interface ButtonGroupProps { id: string; className?: string; items: ToolbarItem[]; + fullWidth?: boolean; } diff --git a/ts/editor-toolbar/DropdownMenu.svelte b/ts/editor-toolbar/DropdownMenu.svelte index 4fdfcadce..f616dd0a5 100644 --- a/ts/editor-toolbar/DropdownMenu.svelte +++ b/ts/editor-toolbar/DropdownMenu.svelte @@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html --> + + -