mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
Add keyboard shortcuts for empty cards and toggle mask on image occlusion (#3136)
* Add keyboard shortcuts for empty cards and toggle mask on image occlusion - add shortcut for empty cards - add shortcut for toggle mask - set tooltips with shortcuts use unused shortcut for empty cards * remove unnecessary shortcut added in main.py * change empty cards shortcut and try to fix CI error in CONTRIBUTORS * change shortcut for empty cards for universal support
This commit is contained in:
parent
b7e782c7e1
commit
074becc0ce
4 changed files with 14 additions and 2 deletions
|
@ -213,6 +213,9 @@
|
|||
<property name="text">
|
||||
<string>qt_misc_empty_cards</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true">Ctrl+Alt+E</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCreateFiltered">
|
||||
<property name="text">
|
||||
|
|
|
@ -14,12 +14,14 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
import DynamicallySlottable from "$lib/components/DynamicallySlottable.svelte";
|
||||
import Icon from "$lib/components/Icon.svelte";
|
||||
import IconButton from "$lib/components/IconButton.svelte";
|
||||
import Shortcut from "$lib/components/Shortcut.svelte";
|
||||
import { mdiTableRefresh, mdiViewDashboard } from "$lib/components/icons";
|
||||
|
||||
import {
|
||||
ioImageLoadedStore,
|
||||
ioMaskEditorVisible,
|
||||
} from "../../routes/image-occlusion/store";
|
||||
import { toggleMaskEditorKeyCombination } from "../../routes/image-occlusion/tools/shortcuts";
|
||||
|
||||
export let api = {};
|
||||
</script>
|
||||
|
@ -39,10 +41,16 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
on:click={() => {
|
||||
$ioMaskEditorVisible = !$ioMaskEditorVisible;
|
||||
}}
|
||||
tooltip={tr.editingImageOcclusionToggleMaskEditor()}
|
||||
tooltip="{tr.editingImageOcclusionToggleMaskEditor()} ({toggleMaskEditorKeyCombination})"
|
||||
>
|
||||
<Icon icon={mdiViewDashboard} />
|
||||
</IconButton>
|
||||
<Shortcut
|
||||
keyCombination={toggleMaskEditorKeyCombination}
|
||||
on:action={() => {
|
||||
$ioMaskEditorVisible = !$ioMaskEditorVisible;
|
||||
}}
|
||||
/>
|
||||
</ButtonGroupItem>
|
||||
<ButtonGroupItem>
|
||||
<IconButton
|
||||
|
|
|
@ -24,3 +24,4 @@ export const alignRightKeyCombination = "Shift+R";
|
|||
export const alignTopKeyCombination = "Shift+T";
|
||||
export const alignVerticalCenterKeyCombination = "Shift+V";
|
||||
export const alignBottomKeyCombination = "Shift+B";
|
||||
export const toggleMaskEditorKeyCombination = "Control+Shift+M";
|
||||
|
|
Loading…
Reference in a new issue