Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions source/_magnifier/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,24 +192,6 @@ def toggleAllFollowStates() -> bool:
return _followStateOverride.isActive


def getDefaultFullscreenMode() -> FullScreenMode:
"""
Get default full-screen mode from config.

:return: The default full-screen mode.
"""
return FullScreenMode(config.conf["magnifier"]["defaultFullscreenMode"])


def setDefaultFullscreenMode(mode: FullScreenMode) -> None:
"""
Set default full-screen mode from settings.

:param mode: The full-screen mode to set.
"""
config.conf["magnifier"]["defaultFullscreenMode"] = mode.value


def isTrueCentered() -> bool:
"""
Check if true centered mode is enabled in config.
Expand Down
110 changes: 66 additions & 44 deletions source/gui/settingsDialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6035,14 +6035,23 @@ def makeSettings(
sizer=settingsSizer,
)

# GENERAL GROUP
# Translators: This is the label for a group of general magnifier options in the
# magnifier settings panel
generalGroupText = _("General")
generalGroupSizer = wx.StaticBoxSizer(wx.VERTICAL, self, label=generalGroupText)
generalGroupBox = generalGroupSizer.GetStaticBox()
generalGroup = guiHelper.BoxSizerHelper(self, sizer=generalGroupSizer)
sHelper.addItem(generalGroup)

# ZOOM SETTINGS
# Translators: The label for a setting in magnifier settings to select the zoom level.
# Translators: The label for a setting in magnifier settings to select the zoom level.
zoomLabelText = _("&Zoom level:")

zoomValues = magnifierConfig.ZoomLevel.zoom_range()
zoomChoices = magnifierConfig.ZoomLevel.zoom_strings()

self.zoomList = sHelper.addLabeledControl(
self.zoomList = generalGroup.addLabeledControl(
zoomLabelText,
wx.Choice,
choices=zoomChoices,
Expand All @@ -6064,30 +6073,11 @@ def makeSettings(
closestIndex = min(zoomIndex - 1, zoomIndex, key=lambda i: abs(zoomValues[i] - zoomLevel))
self.zoomList.SetSelection(closestIndex)

# PAN SETTINGS
# Translators: The label for a setting in magnifier settings to select the pan step size (in percentage).
panStepSizeLabelText = _("&Panning step size (%):")

self.panSpinCtrl = sHelper.addLabeledControl(
panStepSizeLabelText,
wx.SpinCtrl,
min=1,
max=100,
)
self.bindHelpEvent(
"magnifierPanStep",
self.panSpinCtrl,
)

# Set value from config
panStep = magnifierConfig.getPanStep()
self.panSpinCtrl.SetValue(panStep)

# FILTER SETTINGS
# Translators: The label for a setting in magnifier settings to select the default filter
filterLabelText = _("&filter:")
# Translators: The label for a setting in magnifier settings to select the filter
filterLabelText = _("&Filter:")
filterChoices = [f.displayString for f in Filter]
self.filterList = sHelper.addLabeledControl(
self.filterList = generalGroup.addLabeledControl(
filterLabelText,
wx.Choice,
choices=filterChoices,
Expand All @@ -6098,33 +6088,36 @@ def makeSettings(
filterValue = magnifierConfig.getFilter()
self.filterList.SetSelection(list(Filter).index(filterValue))

# FULLSCREEN MODE SETTINGS
# Translators: The label for a setting in magnifier settings to select the full-screen mode
fullscreenModeLabelText = _("&fullscreen mode:")
fullscreenModeChoices = [mode.displayString for mode in FullScreenMode] if FullScreenMode else []
self.fullscreenModeList = sHelper.addLabeledControl(
fullscreenModeLabelText,
wx.Choice,
choices=fullscreenModeChoices,
)
self.bindHelpEvent(
"MagnifierFullscreenFocusMode",
self.fullscreenModeList,
)

# TRUE CENTER
# Translators: The label for a setting in magnifier settings to select whether true center is used in full-screen mode
trueCenterText = _("Use &true center in fullscreen mode")
self.trueCenterCheckBox = sHelper.addItem(wx.CheckBox(self, label=trueCenterText))
trueCenterText = _("Use &true center")
self.trueCenterCheckBox = generalGroup.addItem(
wx.CheckBox(generalGroupBox, label=trueCenterText),
)
self.bindHelpEvent(
"MagnifierUseTrueCenter",
self.trueCenterCheckBox,
)
self.trueCenterCheckBox.SetValue(magnifierConfig.isTrueCentered())

# Set default value from config
defaultFullscreenMode = magnifierConfig.getFullscreenMode()
self.fullscreenModeList.SetSelection(list(FullScreenMode).index(defaultFullscreenMode))
# PAN SETTINGS
# Translators: The label for a setting in magnifier settings to select the pan step size (in percentage).
panStepSizeLabelText = _("&Panning step size (%):")

self.panSpinCtrl = generalGroup.addLabeledControl(
panStepSizeLabelText,
wx.SpinCtrl,
min=1,
max=100,
)
self.bindHelpEvent(
"MagnifierPanningStepSize",
self.panSpinCtrl,
)

# Set value from config
panStep = magnifierConfig.getPanStep()
self.panSpinCtrl.SetValue(panStep)

# FOCUS GROUP
# Translators: This is the label for a group of focus options in the magnifier settings panel
Expand Down Expand Up @@ -6154,10 +6147,39 @@ def makeSettings(
checkBox.SetValue(magnifierConfig.getFollowState(focusType))
self._followFocusCheckBoxes[focusType] = checkBox

# FULLSCREEN GROUP
# Translators: This is the label for a group of fullscreen magnifier options in the
# magnifier settings panel
fullscreenGroupText = _("Fullscreen")
self.fullscreenGroupSizer = wx.StaticBoxSizer(wx.VERTICAL, self, label=fullscreenGroupText)
fullscreenGroupBox = self.fullscreenGroupSizer.GetStaticBox()
fullscreenGroup = guiHelper.BoxSizerHelper(self, sizer=self.fullscreenGroupSizer)
sHelper.addItem(fullscreenGroup)

# FULLSCREEN MODE SETTINGS
# Translators: The label for a setting in magnifier settings to select the full-screen mode
fullscreenModeLabelText = _("Focus &mode:")
fullscreenModeChoices = [mode.displayString for mode in FullScreenMode] if FullScreenMode else []
self.fullscreenModeList = fullscreenGroup.addLabeledControl(
fullscreenModeLabelText,
wx.Choice,
choices=fullscreenModeChoices,
)
self.bindHelpEvent(
"MagnifierFullscreenFocusMode",
self.fullscreenModeList,
)

# Set value from config
fullscreenModeValue = magnifierConfig.getFullscreenMode()
self.fullscreenModeList.SetSelection(list(FullScreenMode).index(fullscreenModeValue))

# KEEP MOUSE CENTERED
# Translators: The label for a checkbox to keep the mouse pointer centered in the magnifier view
keepMouseCenteredText = _("Keep &mouse pointer centered in magnifier view")
self.keepMouseCenteredCheckBox = sHelper.addItem(wx.CheckBox(self, label=keepMouseCenteredText))
self.keepMouseCenteredCheckBox = fullscreenGroup.addItem(
wx.CheckBox(fullscreenGroupBox, label=keepMouseCenteredText),
)
self.bindHelpEvent(
"MagnifierKeepMouseCentered",
self.keepMouseCenteredCheckBox,
Expand Down
13 changes: 6 additions & 7 deletions user_docs/en/userGuide.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- markdownlint-disable-file MD060 -->

# NVDA NVDA_VERSION User Guide

[TOC]
Expand Down Expand Up @@ -2191,10 +2193,9 @@ If you find that NVDA is reading punctuation in the wrong language for a particu

##### Unicode normalization {#SpeechUnicodeNormalization}

When this option is enabled, Unicode normalization is performed on the text that is spoken by NVDA.
When this option is enabled, unicode normalization is performed on the text that is spoken by NVDA.
This is beneficial when speaking characters that can be represented in several forms.
NVDA uses the NFKC (Normalization Form Compatibility Composition) algorithm, with additional normalization applied.
NFKC provides the following benefits, among others:
NVDA uses the NFKC (Normalization Form Compatibility Composition) algorithm, which provides the following benefits, among others:

1. The bold and italic versions of characters that are part of the Unicode standard and are commonly used on social media are normalized to their most common compatible equivalent.
For example, the Latin letter "h" can also be presented as "𝐡" (bold), "ℎ" (italic), etc. but will always be spoken as "h" when normalization is enabled.
Expand All @@ -2208,11 +2209,11 @@ This aspect of normalization also aids in reading equations in the Microsoft Wor

Unicode normalization ensures that only one form will be used throughout all speech output, which is the single-character variant.

1. Decomposition of some ligatures, including "ij" (ligature ij) to their two letter form ("ij").
1. Decomposition of some ligatures, Including "ij" (ligature ij) to their two letter form ("ij").

1. Stable ordering of modifiers in composite characters, for example in ancient Hebrew.

The additional normalization in NVDA handles decorative letter variants that the standard NFKC algorithm does not decompose.
1. Normalization of decorative letter variants that the standard NFKC algorithm does not decompose.
Certain Unicode characters, such as negative circled Latin capital letters (🅐–🅩) and negative squared Latin capital letters (🅲–🅩), are treated as autonomous symbols by the Unicode standard and have no compatibility decomposition.
NVDA extends NFKC by mapping these characters to their plain Latin letter equivalents (A–Z).
Note that a small number of negative squared letters that have emoji semantics (🅰, 🅱, 🅾, 🅿) are excluded from this mapping to preserve their distinct meaning.
Expand Down Expand Up @@ -6406,5 +6407,3 @@ The following values can be set under this registry key:
If you require further information or assistance regarding NVDA, please visit the [NVDA web site](NVDA_URL).
Here, you can find additional documentation, as well as technical support and community resources.
This site also provides information and resources concerning NVDA development.

<!-- markdownlint-disable-file MD060 -->
Loading