feat(desktop): add "Reset Zoom" item to the Window menu - #5185
Open
xrgzs wants to merge 1 commit into
Open
Conversation
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.
Closes #5184
Summary
Add a Reset Zoom item to the Window menu, between "Zoom Out" and the separator.
It restores the window zoom factor to 1.0 by reusing the existing
mt::window-zoomIPC channel (same workaround as Zoom In/Out for Electron#16018), and is registered
as a
window.resetZoomcommand so it can be rebound in preferences.resetZoominsrc/main/windows/utils.tsWINDOW_ZOOM_RESET(window.resetZoom) insrc/common/commands/constants.tssrc/main/menu/templates/window.tswith i18n labels(
menu.window.resetZoom) for all 10 localesType of change
Test plan
pattern of the existing Zoom In/Out menu items; behavior verified by typecheck
and manual testing.
Notes for reviewers [optional]
Ctrl+0/Cmd+0are already taken(
tabs.switchToTenthon Win/Linux,paragraph.paragraphon macOS), so thekeybinding ships empty like
window.zoomIn/window.zoomOutand can becustomized in preferences.
resetZoomrole behavior.By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.