Skip to content

Commit df3c55c

Browse files
authored
Merge ad8e99d into 3fbe7ae
2 parents 3fbe7ae + ad8e99d commit df3c55c

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

source/gui/logViewer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# A part of NonVisual Desktop Access (NVDA)
22
# This file is covered by the GNU General Public License.
33
# See the file COPYING for more details.
4-
# Copyright (C) 2008-2022 NV Access Limited
4+
# Copyright (C) 2008-2024 NV Access Limited, Cyrille Bougot
55

66
"""Provides functionality to view the NVDA log.
77
"""
@@ -33,6 +33,10 @@ def __init__(self, parent):
3333
self.Bind(wx.EVT_CLOSE, self.onClose)
3434
mainSizer = wx.BoxSizer(wx.VERTICAL)
3535
self.outputCtrl = wx.TextCtrl(self, wx.ID_ANY, size=(500, 500), style=wx.TE_MULTILINE | wx.TE_READONLY|wx.TE_RICH)
36+
font = self.outputCtrl.GetFont()
37+
# Set a fixed width font so that the error is correctly pointed in Python tracebacks.
38+
font.SetFaceName('Consolas')
39+
self.outputCtrl.SetFont(font)
3640
self.outputCtrl.Bind(wx.EVT_KEY_DOWN, self.onOutputKeyDown)
3741
mainSizer.Add(self.outputCtrl, proportion=1, flag=wx.EXPAND)
3842
self.SetSizer(mainSizer)

source/pythonConsole.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# A part of NonVisual Desktop Access (NVDA)
33
# This file is covered by the GNU General Public License.
44
# See the file COPYING for more details.
5-
# Copyright (C) 2008-2020 NV Access Limited, Leonard de Ruijter, Julien Cochuyt
5+
# Copyright (C) 2008-2024 NV Access Limited, Leonard de Ruijter, Julien Cochuyt, Cyrille Bougot
66

77
import watchdog
88

@@ -298,13 +298,19 @@ def __init__(self, parent):
298298
self.Bind(wx.EVT_CLOSE, self.onClose)
299299
mainSizer = wx.BoxSizer(wx.VERTICAL)
300300
self.outputCtrl = wx.TextCtrl(self, wx.ID_ANY, size=(500, 500), style=wx.TE_MULTILINE | wx.TE_READONLY|wx.TE_RICH)
301+
font = self.outputCtrl.GetFont()
302+
font.SetFaceName('Consolas')
303+
self.outputCtrl.SetFont(font)
301304
self.outputCtrl.Bind(wx.EVT_KEY_DOWN, self.onOutputKeyDown)
302305
self.outputCtrl.Bind(wx.EVT_CHAR, self.onOutputChar)
303306
mainSizer.Add(self.outputCtrl, proportion=2, flag=wx.EXPAND)
304307
inputSizer = wx.BoxSizer(wx.HORIZONTAL)
305308
self.promptLabel = wx.StaticText(self, wx.ID_ANY)
306309
inputSizer.Add(self.promptLabel, flag=wx.EXPAND)
307310
self.inputCtrl = wx.TextCtrl(self, wx.ID_ANY, style=wx.TE_DONTWRAP | wx.TE_PROCESS_TAB)
311+
font = self.inputCtrl.GetFont()
312+
font.SetFaceName('Consolas')
313+
self.inputCtrl.SetFont(font)
308314
self.inputCtrl.Bind(wx.EVT_CHAR, self.onInputChar)
309315
self.inputCtrl.Bind(wx.EVT_TEXT_PASTE, self.onInputPaste)
310316
inputSizer.Add(self.inputCtrl, proportion=1, flag=wx.EXPAND)

user_docs/en/changes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
Please refer to [the developer guide](https://www.nvaccess.org/files/nvda/documentation/developerGuide.html#API) for information on NVDA's API deprecation and removal process.
2020

2121
* Fixed NVDA's build system to work properly when using Visual Studio 2022 version 17.10 and above. (#16480, @LeonarddeR)
22+
* A fixed width font is now used in Log Viewer and in the NVDA Python Console so that the cursor remains in the same column during vertical navigation.
23+
It is especially useful to read the error location markers in tracebacks. (#16321, @CyrilleB79)
2224
* Support for custom braille tables has been added. (#3304, #16208, @JulienCochuyt, @LeonarddeR)
2325
* Tables can be provided in the `brailleTables` folder in an add-on package.
2426
* Table metadata can be added to an optional `brailleTables` section in the add-on manifest or to a `.ini` file with the same format found in the brailleTables subdirectory of the scratchpad directory.

0 commit comments

Comments
 (0)