Skip to content

Commit c5231c2

Browse files
Add F9 keyboard shortcut
1 parent aec4ec3 commit c5231c2

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

gradia/ui/ui_parts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ def create(self):
128128
(_("Reset Zoom"), "<Ctrl>0"),
129129
]),
130130
(_("General"), [
131+
(_("Toggle Sidebar"), "F9"),
131132
(_("Keyboard Shortcuts"), "<Ctrl>question"),
132133
(_("Preferences"), "<Ctrl>comma"),
133134
(_("Open Source Snippets"), "<Ctrl>P"),

gradia/ui/window.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ def _setup_actions(self) -> None:
144144
self.create_action("crop", lambda *_: self.image_bin.on_toggle_crop(), ["<Primary>r"])
145145
self.create_action("reset-crop", lambda *_: self.image_bin.reset_crop_selection(), ["<Primary><Shift>r"])
146146
self.create_action("sidebar-shown", lambda action, param: self.split_view.set_show_sidebar(param.get_boolean()), vt="b")
147+
self.create_action("toggle-sidebar", lambda *_: self.split_view.set_show_sidebar(not self.split_view.get_show_sidebar()), ["F9"])
147148
self.create_action("ocr", lambda *_: self.on_ocr(), ["<Primary>o"], stateful=True)
148149

149150
self.create_action("zoom-in", lambda *_: self.image_bin.zoom_in(), ["<Control>plus", "<Control>equal", "<Control>KP_Add"])

0 commit comments

Comments
 (0)