Skip to content

Commit

Permalink
Merge pull request #1451 from benoit-pierre/fix_paper_tape_regression
Browse files Browse the repository at this point in the history
Fix paper tape regression
  • Loading branch information
benoit-pierre authored Feb 6, 2022
2 parents 1e4d8b3 + 263effa commit e162972
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 6 additions & 0 deletions news.d/feature/1451.ui.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Improve accessibility:
- Disable tab-key navigation in tables, so focusing a table does not lock global tab-key navigation to it.
- Remove some container widgets, tweak focus rules to avoid extra unnecessary steps when using tab-key navigation (like selecting the dictionaries widget outer frame).
- In form layouts, link each widget to its label (like each option in the configuration dialog).
- Set the accessible name / description of focusable widgets.
- Use lists for the dictionaries widget, suggestions widget, and the paper tape.
9 changes: 2 additions & 7 deletions plover/gui_qt/paper_tape.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ def _paper_format(self, stroke):
def _raw_format(stroke):
return stroke.rtfcre

def headerData(self, section, orientation, role):
if (section != 0 or orientation != Qt.Horizontal or
role != Qt.DisplayRole or self._style != STYLE_PAPER):
return None
return self._all_keys

def data(self, index, role):
if not index.isValid():
return None
Expand Down Expand Up @@ -163,7 +157,8 @@ def _save_state(self, settings):

def on_config_changed(self, config):
if 'system_name' in config:
self._model.reset()
all_keys = self._model.reset()
self.header.setText(all_keys)

@property
def _scroll_at_end(self):
Expand Down

0 comments on commit e162972

Please sign in to comment.