Add UI setting for zoom follows cursor behavior - #399
Merged
Conversation
Expose the zoomFollowsCursor QSetting in the Settings dialog. This setting was added in commit 36a9d02 (PR mrkite#295) as a hidden option for future UI exposure. Users can now toggle between cursor-based zooming (zoom toward mouse position) and center-based zooming (zoom toward screen center) via a checkbox in Settings. Default remains true (cursor-based).
Contributor
Author
|
I know you are are busy, no hurries on reviewing this please. I just wanted to put it here :) |
Collaborator
|
Looks fine to me. Also nice prepared PR description. I understand your use case. But of course, having that setting is fine. |
Contributor
Author
|
Thank you :) |
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.
Summary
Minutor already zooms toward the mouse cursor on wheel zoom, but the setting that controls it (
zoomFollowsCursor) has only ever existed as a hiddenQSettingsvalue, with no way to change it short of editing settings by hand. The commit that added the behavior, #295 (36a9d02), explicitly anticipated this follow-up: "a future commit could expose this setting in the GUI, making it possible to disable the new zoom behavior." This PR adds that checkbox to the Settings dialog.My use case is comparing the same place in two worlds from different points in time, to spot what changed between them. That comparison works best when the view stays centered on the same spot as you zoom in for a closer look. The cursor-following default instead re-centers on wherever the mouse is, which drifts the framing and pushes the two views out of alignment. Unchecking the box restores center-anchored zoom and holds the framing steady, so the two stay lined up.
What changed
zoomFollowsCursorkey the same way the other checkboxes are (load, default, save).Behavior
Screenshot
Notes
zoomFollowsCursorkey or its semantics; this only adds the missing UI.settingsUpdated(): the value is read live at zoom time, so no redraw is needed.qmake && make(Qt 5).settings.uidiff is mostly whitespace. Adding the checkbox below the existing row meant wrapping that row in a vertical layout, which re-indents the surrounding markup. The real change is about 14 lines.