Anki is a smart spaced repetition flashcard program
Find a file
Matthias Metelka 9f8667fb47
Auto-hide toolbar in Reviewer (#2262)
* Give webviews a slide-in animation

if reduced motion isn't set.

* Auto-hide toolbar in review mode

moving the mouse above the main webview expands the toolbar. When the mouse leaves the toolbar, it will collapse after a delay of 2s.

* Save some space on bottom toolbars

* Use props for all hard-coded transition durations

and decrease most commonly used duration (200ms) to 150ms.

* Move auto-hide logic into ToolbarWebView

and handle auto-hide specific events in the respective webview subclasses.

* Fix typing issues

* Fix flickering issue

* Add auto_hide_toolbar opt-in to preferences

* Rename hide_toolbar to collapse_toolbar

to better describe the dock-like behaviour.

* Rename setting to minimize_distractions

* Reduce calls to pm in eventFilter

* Run formatter

* Revert setting title to something more specific

* Increase default animation time to 180ms

* Inset toolbar in review mode

when auto-hide is not enabled.

* Use card background on toolbar and add glass effect

* Use flatten/elevate over inset/outset

* Use flatten/elevate over inset/outset

* Update toolbar.py

* Fix toolbar background delay

* Tweak styles

* Use "collapse" instead of "auto-hide"

* Fix background misalignment in collapse mode

* Do not collapse toolbar when pointer is outside MainWebView

* Reduce hide_timer interval to 1000ms

* Use CSS to hide toolbar instead of setting webview height

* Add guard to prevent backdrop-filter: blur on Qt 5.14

* Apply transition to body instead of toolbar

to not complicate things for #2301.

* Fix Qt 5.14 and apply guard globally

* Fix background image scaling difference

* Tweak preference wording (dae)
2023-01-09 14:39:31 +10:00
.buildkite Whitelist dependabot 2023-01-07 09:53:29 +10:00
.cargo Re-enable formatting for .toml files 2022-11-28 09:16:28 +10:00
.config Re-enable formatting for .toml files 2022-11-28 09:16:28 +10:00
.github/ISSUE_TEMPLATE Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.vscode.dist Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
build Bump tokio from 1.23.0 to 1.23.1 (#2303) 2023-01-07 10:01:56 +10:00
cargo Migrate from slog to tracing 2022-12-24 10:44:40 +10:00
docs Mention how to fix build crash in the readme. (#2286) 2022-12-30 13:10:37 +10:00
ftl Auto-hide toolbar in Reviewer (#2262) 2023-01-09 14:39:31 +10:00
proto Integrate AnkiDroid's backend patches into the repo (#2290) 2023-01-03 13:11:23 +10:00
pylib Integrate AnkiDroid's backend patches into the repo (#2290) 2023-01-03 13:11:23 +10:00
python Add dev tools for live-reloading Anki's web views (#2151) 2023-01-03 11:55:58 +10:00
qt Auto-hide toolbar in Reviewer (#2262) 2023-01-09 14:39:31 +10:00
rslib Allow timestamps to be a day ahead 2023-01-09 10:04:48 +10:00
sass Auto-hide toolbar in Reviewer (#2262) 2023-01-09 14:39:31 +10:00
tools Add dev tools for live-reloading Anki's web views (#2151) 2023-01-03 11:55:58 +10:00
ts Auto-hide toolbar in Reviewer (#2262) 2023-01-09 14:39:31 +10:00
.deny.toml Migrate from slog to tracing 2022-12-24 10:44:40 +10:00
.dprint.json Update Chrono Crate (#2242) 2022-12-07 17:00:14 +10:00
.eslintrc.js Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.gitattributes try again to improve GitHub's language stats 2021-01-20 13:20:45 +10:00
.gitignore Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.gitmodules Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.isort.cfg Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.mypy.ini Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.prettierignore Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
.prettierrc Mathjax editor improvements (#1502) 2021-11-23 10:27:32 +10:00
.pylintrc Switch back to winrt to see if it fixes slow TTS 2022-12-06 20:30:54 +10:00
.rustfmt-empty.toml Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.rustfmt.toml Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.version Bump version 2023-01-09 11:08:53 +10:00
Cargo.lock Bump tokio from 1.23.0 to 1.23.1 (#2303) 2023-01-07 10:01:56 +10:00
Cargo.toml Move more of the graph processing into the backend 2022-12-16 21:42:17 +10:00
CONTRIBUTORS Nested clozes and increased cloze meta data (#2141) 2022-12-19 12:03:15 +10:00
LICENSE move aqt_data into source folder; implement wheel building 2020-11-04 12:14:03 +10:00
ninja Add env var to enable sourcemaps 2022-12-04 11:37:16 +10:00
package.json Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
pkgkey.asc add public key for release signing 2018-09-18 10:40:45 +10:00
README.md fix build badge 2021-06-24 09:21:56 +10:00
run Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
run.bat Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
rust-toolchain.toml Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
SECURITY.md add SECURITY.md 2021-09-22 22:55:19 +10:00
yarn.lock Update json5 due to CWE 2023-01-03 13:03:25 +10:00

Anki

Build status

This repo contains the source code for the computer version of Anki.

If you'd like to try development builds of Anki but don't feel comfortable building the code, please see https://betas.ankiweb.net/

For more information on building, please see Development.