Skip to content

Persist magnifier zoom, filter, full screen mode#20050

Draft
seanbudd wants to merge 2 commits intomasterfrom
persistMag
Draft

Persist magnifier zoom, filter, full screen mode#20050
seanbudd wants to merge 2 commits intomasterfrom
persistMag

Conversation

@seanbudd
Copy link
Copy Markdown
Member

@seanbudd seanbudd commented May 4, 2026

Link to issue number:

Fixes #19493

Summary of the issue:

Magnifier zoom, filter and full screen mode were not persisted when set via keyboard gestures

Description of user facing changes:

Persist Magnifier zoom, filter and full screen mode in settings

Description of developer facing changes:

none

Description of development approach:

add calls to persist the settings when they are changed

Testing strategy:

manual testing

Known issues with pull request:

none

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@seanbudd seanbudd marked this pull request as ready for review May 4, 2026 06:07
@seanbudd seanbudd requested a review from a team as a code owner May 4, 2026 06:07
@seanbudd seanbudd requested review from SaschaCowley and Copilot May 4, 2026 06:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates NVDA's magnifier module so gesture-driven changes are written back to the running configuration, aligning keyboard commands with how magnifier settings are expected to persist across restarts and re-enablement.

Changes:

  • Persist zoom level changes by writing from the magnifier zoom setter into config.
  • Persist filter changes when cycling filters from commands.
  • Persist full-screen mode changes when cycling focus modes from commands.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
source/_magnifier/magnifier.py Writes zoom-level updates to config from the shared magnifier setter.
source/_magnifier/commands.py Persists filter and full-screen mode changes triggered by keyboard commands.

newMode = modes[(idx + 1) % len(modes)]
log.debug(f"Changing full-screen mode from {currentMode} to {newMode}")
magnifier._fullscreenMode = newMode
setFullscreenMode(newMode)
closestZoom = min(validZoomValues, key=lambda x: abs(x - value))
log.warning(f"Invalid zoom level {value}, using closest valid value {closestZoom}")
value = closestZoom
setZoomLevel(value)
magnifier.filterType = filters[(idx + 1) % len(filters)]
if magnifier._magnifierType == MagnifierType.FULLSCREEN:
magnifier._applyFilter()
setFilter(magnifier.filterType)
@seanbudd seanbudd marked this pull request as draft May 4, 2026 06:34
@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Persist magnification settings (zoom level, filter etc) when modified with gestures

2 participants