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:
Pedro Schreiber 2024-04-25 04:19:38 -03:00 committed by GitHub
parent b7e782c7e1
commit 074becc0ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 2 deletions

View file

@ -162,7 +162,7 @@ Lucas Scharenbroch <lucasscharenbroch@gmail.com>
Antonio Cavallo <a.cavallo@cavallinux.eu>
Han Yeong-woo <han@yeongwoo.dev>
Jean Khawand <jk@jeankhawand.com>
Pedro Schreiber <schreiber.mmb@gmail.com>
Pedro Schreiber <schreiber.mmb@gmail.com>
Foxy_null <https://github.com/Foxy-null>
Arbyste <arbyste@outlook.com>
Vasll <github.com/vasll>

View file

@ -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">

View file

@ -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

View file

@ -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";