From d46fe913a5678842f09eb482e09b72dd553423e5 Mon Sep 17 00:00:00 2001 From: RumovZ Date: Fri, 21 May 2021 18:59:53 +0200 Subject: [PATCH 1/4] Scroll pixels instead of columns horizontally --- qt/aqt/browser/table/table.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qt/aqt/browser/table/table.py b/qt/aqt/browser/table/table.py index ed3a7dd6e..aa97827b8 100644 --- a/qt/aqt/browser/table/table.py +++ b/qt/aqt/browser/table/table.py @@ -270,6 +270,8 @@ class Table: self._view.selectionModel().selectionChanged, self.browser.onRowChanged ) self._view.setWordWrap(False) + self._view.setHorizontalScrollMode(QAbstractItemView.ScrollPerPixel) + self._view.horizontalScrollBar().setSingleStep(10) self._update_font() if not theme_manager.night_mode: self._view.setStyleSheet( From 958c53d886a1eea29078075e26bd282ca18e741b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 22 May 2021 10:12:14 +1000 Subject: [PATCH 2/4] fix find&replace searching in incorrect field --- qt/aqt/browser/find_and_replace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/aqt/browser/find_and_replace.py b/qt/aqt/browser/find_and_replace.py index d6d111f58..2abb814d4 100644 --- a/qt/aqt/browser/find_and_replace.py +++ b/qt/aqt/browser/find_and_replace.py @@ -112,7 +112,7 @@ class FindAndReplaceDialog(QDialog): if self.form.field.currentIndex() == 0: field = None else: - field = self.field_names[self.form.field.currentIndex() - 2] + field = self.field_names[self.form.field.currentIndex()] find_and_replace( parent=self.parentWidget(), From 7bf661ee0540470c3e0e4876407020bf7077eeae Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 22 May 2021 10:19:13 +1000 Subject: [PATCH 3/4] fix missing cumulative overlays in graphs --- ts/graphs/histogram-graph.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/graphs/histogram-graph.ts b/ts/graphs/histogram-graph.ts index cb11698a9..4930dfec0 100644 --- a/ts/graphs/histogram-graph.ts +++ b/ts/graphs/histogram-graph.ts @@ -140,7 +140,7 @@ export function histogramGraph( ) .attr("direction", "ltr"); - svg.select("path.area") + svg.select("path.cumulative-overlay") .datum(areaData as any) .attr( "d", From d7d226843ef26a7d7e6b3e5eb6c88769b5f59576 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 22 May 2021 10:31:17 +1000 Subject: [PATCH 4/4] improve type answer legibility https://forums.ankiweb.net/t/accessibility-suggestion-correct-answer-text-contrast-in-dark-mode/10105 There's probably more that could be done here, but that can probably wait for #1068 --- qt/aqt/data/web/css/reviewer.scss | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qt/aqt/data/web/css/reviewer.scss b/qt/aqt/data/web/css/reviewer.scss index 216d63f53..1d35ef397 100644 --- a/qt/aqt/data/web/css/reviewer.scss +++ b/qt/aqt/data/web/css/reviewer.scss @@ -53,14 +53,17 @@ img { } .typeGood { - background: #0f0; + background: #afa; + color: black; } .typeBad { - background: #f00; + color: black; + background: #faa; } .typeMissed { + color: black; background: #ccc; }