feat: Include command/control-0 for OriginalSize in StandardKeyBindings#220
Merged
tlambert03 merged 1 commit intopyapp-kit:mainfrom Aug 17, 2024
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #220 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 31 31
Lines 1870 1871 +1
=========================================
+ Hits 1870 1871 +1 ☔ View full report in Codecov by Sentry. |
28df865 to
1c1c4ea
Compare
Contributor
|
@tlambert03 it would be nice to have this PR released so we can merge a related PR in napari. Any chance of an app-model release soonish? |
Member
|
just pushed v0.3.0, lemme know if the release fails for any reason |
jni
pushed a commit
to napari/napari
that referenced
this pull request
Sep 23, 2024
# References and relevant issues Closes #4855 # Description This PR adds menu items and "standard keybindings" for Zoom in, Zoom out, and Reset Zoom to the View menu. The keybindings are Qt defaults (https://doc.qt.io/qtcreator/creator-keyboard-shortcuts.html#image-viewer-shortcuts), as well as defaults on macOS and Windows (see e.g. Adobe Photoshop or Chrome) Note: I've made a PR to app-model to add the Reset Zoom standard keybinding (pyapp-kit/app-model#220) so if that is merged I can edit this PR to use that here too! I added to a test for the new behavior. Note, this approach does not present these as editable in the napari Preferences. I These are bound like an OS default would be, e.g. copy, paste, etc. They are editable on the OS level at least on macOS. --------- Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I just discovered the very cool StandardKeyBindings while adding Zoom keybindings in napari.
In this PR I'm just adding the
command/control-0to reset zoom as a standard keybinding, sometimes called OriginalSize (Qt), Actual Size (macOS), etc. but a consistent pattern on macOS and Windows and in Qt (https://doc.qt.io/qtcreator/creator-keyboard-shortcuts.html#image-viewer-shortcuts).