Skip to content

Persist magnifier starting#20051

Draft
seanbudd wants to merge 1 commit intomasterfrom
persistMagnifierStart
Draft

Persist magnifier starting#20051
seanbudd wants to merge 1 commit intomasterfrom
persistMagnifierStart

Conversation

@seanbudd
Copy link
Copy Markdown
Member

@seanbudd seanbudd commented May 4, 2026

Link to issue number:

Fixes #19494

Summary of the issue:

Whether or not the magnifier has already started was not persisted in config

Description of user facing changes:

magnifier being enabled is now persisted in config

fixed some collisions with accelerator keys in the magnifier settings dialog

Description of developer facing changes:

none

Description of development approach:

added code to toggle magnifier and persist in settings

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:39
@seanbudd seanbudd requested a review from a team as a code owner May 4, 2026 06:39
Copilot AI review requested due to automatic review settings May 4, 2026 06:39
@seanbudd seanbudd requested a review from a team as a code owner May 4, 2026 06:39
@seanbudd seanbudd marked this pull request as draft May 4, 2026 06:39
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 aims to persist NVDA’s Magnifier enabled/disabled state in configuration, expose an “Enable magnifier” checkbox in the Magnifier settings panel (with immediate effect), and adjust some dialog accelerator keys to avoid conflicts.

Changes:

  • Add magnifier.enabled to the config spec and implement getEnabled/setEnabled helpers.
  • Update magnifier toggle command to persist enabled state.
  • Add an “Enable magnifier (immediate effect)” checkbox to the Magnifier settings panel and update User Guide documentation.

Reviewed changes

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

Show a summary per file
File Description
user_docs/en/userGuide.md Documents new Magnifier enable setting in the User Guide.
source/gui/settingsDialogs.py Adds enable/disable checkbox to the Magnifier settings panel and adjusts accelerator keys.
source/config/configSpec.py Introduces persisted magnifier.enabled setting.
source/_magnifier/config.py Adds config accessors for magnifier enabled state.
source/_magnifier/commands.py Persists enabled state when toggling magnifier.


# Magnifier settings
[magnifier]
enabled = boolean(default=false)
Comment on lines +18 to +20
Set the config for the magnifier state (enable or disabled).

:param enabled: True if the magnifier is enabled, False if it is disabled.
Comment on lines 80 to 122
def toggleMagnifier() -> None:
"""Toggle the NVDA magnifier on/off"""
import screenCurtain

magnifier: Magnifier = getMagnifier()
if magnifier and magnifier._isActive:
# Stop magnifier
terminate()
ui.message(
pgettext(
"magnifier",
# Translators: Message announced when stopping the NVDA magnifier.
"Exiting magnifier",
),
)
# Check if Screen Curtain is active
elif screenCurtain.screenCurtain and screenCurtain.screenCurtain.enabled:
ui.message(
pgettext(
"magnifier",
# Translators: Message announced when trying to start magnifier while Screen Curtain is active.
"Cannot start magnifier: Screen Curtain is active. Please disable Screen Curtain first.",
),
)
return
else:
initialize()

filter = getFilter()
fullscreenMode = getFullscreenMode()

ui.message(
pgettext(
"magnifier",
# Translators: Message announced when starting the NVDA magnifier.
"Starting magnifier with {zoomLevel} zoom level, {filter} filter, and {fullscreenMode} full-screen mode",
).format(
zoomLevel=getZoomLevelString(),
filter=filter.displayString,
fullscreenMode=fullscreenMode.displayString,
),
)
setEnabled(isActive())

Comment thread user_docs/en/userGuide.md
The Magnifier category in the NVDA Settings dialog allows you to configure the default behavior of NVDA's built-in [Magnifier](#Magnifier) feature.
This settings category contains the following options:

##### Enable Magnfier {#MagnifierEnable}
Comment thread user_docs/en/userGuide.md

##### Enable Magnfier {#MagnifierEnable}

Enables the magnifier.
config.conf["magnifier"]["keepMouseCentered"] = self.keepMouseCenteredCheckBox.GetValue()

def onEnableMagnifierChange(self, evt: wx.CommandEvent):
toggleMagnifier()
fullscreenMode=fullscreenMode.displayString,
),
)
setEnabled(isActive())
@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.

Store whether Magnifier is enabled in the config

2 participants