[orca] Braille: Ensure focused region starts the display when panToCursor
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Braille: Ensure focused region starts the display when panToCursor
- Date: Thu, 23 Apr 2020 21:49:47 +0000 (UTC)
commit 3e934f44655b88783b5fba6f0185410f6786faa8
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Apr 23 17:44:07 2020 -0400
Braille: Ensure focused region starts the display when panToCursor
When we update the braille for a particular object, braille.refresh()
would sometimes show the object at the left of the display, but other
times not. The difference was whether the object could fully fit on
the display. Thus when navigating to a menu with long names, the display
started with the menu name. But if the name was short, the application
name (or the end of it) might show as a prefix to the menu name. This
inconsistency seems bad. So stop it.
src/orca/braille.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/src/orca/braille.py b/src/orca/braille.py
index 331e97180..cc98058d7 100644
--- a/src/orca/braille.py
+++ b/src/orca/braille.py
@@ -1180,10 +1180,7 @@ def refresh(panToCursor=True,
# right of the display if we need to pan right.
#
if panToCursor and (cursorOffset >= 0):
- if len(string) <= _displaySize[0] \
- and cursorOffset < _displaySize[0]:
- viewport[0] = 0
- elif targetCursorCell:
+ if targetCursorCell:
viewport[0] = max(0, cursorOffset - targetCursorCell + 1)
elif cursorOffset < viewport[0]:
viewport[0] = max(0, cursorOffset)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]