Commit graph

2965 commits

Author SHA1 Message Date
Damien Elmes
d13e6cb29e redraw top toolbar when deck list refreshed
Just a hack that allows users to click on Decks to adjust the colour
after a macOS theme change.
2020-01-31 13:31:31 +10:00
Damien Elmes
a25c092a8b ignore dark mode when running from source, as it doesn't work 2020-01-31 13:30:35 +10:00
Damien Elmes
b7c492c40c maintain separate icon cache for light and dark themes 2020-01-31 13:30:12 +10:00
Damien Elmes
7a63c42b39 use night mode when dark mode active, using standard macOS theme 2020-01-31 13:15:08 +10:00
Damien Elmes
39b7786573 put % in spinners
fixes the lone % shown for users of the v1 scheduler
2020-01-31 12:19:51 +10:00
Damien Elmes
bc609dc2d9 ignore immediate=True in progress dialog
Instead, set the busy cursor immediately to give the user feedback,
but defer popup for at least 500ms. This will hopefully address the
white flash in night mode on Windows, and prevent progress dialogs
from rapidly appearing and disappearing for short operations.
2020-01-31 08:47:05 +10:00
Damien Elmes
5da6797a99 ignore foreground/background colour in spans when night mode active
This prevents pasted text from a standard webpage appearing as
black on white. It could theoretically be made smarter in the future,
but handling all the situations where the background or foreground
colour is not exactly #000/#fff might be tricky.
2020-01-31 08:03:09 +10:00
Damien Elmes
58fdc22486 make link/filtered deck colour in night mode more blue 2020-01-31 07:38:14 +10:00
Damien Elmes
dc565082cf add schedv2_did_answer_review_card hook 2020-01-31 07:30:13 +10:00
Damien Elmes
4f6d18ee19 drop the extraneous svg group 2020-01-31 07:23:35 +10:00
Damien Elmes
3309d0f8c6 disable elastic scrolling to work around Qt's buggy behaviour on macOS 2020-01-31 07:12:27 +10:00
Damien Elmes
42f09fe933 add compat soundLink selector back 2020-01-31 07:01:22 +10:00
Damien Elmes
a8e0b53165 add .night_mode as well
Please report if this causes any regressions.
2020-01-31 07:00:01 +10:00
Damien Elmes
bbd134fcc6 use SVG for the play icon, and reduce the default size to 40px 2020-01-28 10:11:29 +10:00
Damien Elmes
90e619dcae better help link for blank cards 2020-01-28 07:53:55 +10:00
Damien Elmes
86a580d820 reuse reveal_cloze_text() for LaTeX cloze expansion 2020-01-28 07:40:44 +10:00
Damien Elmes
d598ce45fe move cloze-related code into a separate file 2020-01-27 20:41:23 +10:00
Damien Elmes
d09a0e6115 update translations 2020-01-27 18:17:59 +10:00
Damien Elmes
2bada0e891 tolerate branch idx out of range
Branches can't be deleted at the moment, but this may change in the
future.
2020-01-27 17:59:40 +10:00
Damien Elmes
8014fd6574 mac top toolbar looks better with a slightly whiter border 2020-01-27 17:02:40 +10:00
Damien Elmes
8bd253c48f rework update checks to match latest AnkiWeb API 2020-01-27 17:01:09 +10:00
Damien Elmes
bd94e6fc01 fix +ve max versions being marked as disabled 2020-01-27 16:58:12 +10:00
Damien Elmes
92adb7a6db don't do HTML filtering when pasting urls/text/images
fixes
https://anki.tenderapp.com/discussions/ankidesktop/37752-anki-21-wont-play-audio-files-with-a-blank-in-the-title
2020-01-26 19:13:31 +10:00
Damien Elmes
7abe5d2a9b fix pylint 2020-01-26 18:57:32 +10:00
Damien Elmes
f38aa3f320 style tags area like fields 2020-01-26 18:47:28 +10:00
Damien Elmes
7b84eb2c7f remove the extra margin in the editing area so everything lines up 2020-01-26 18:26:03 +10:00
Damien Elmes
f253711559 remove the line at the top of the editor 2020-01-26 18:25:44 +10:00
Damien Elmes
dbaac0ae23 use a darker rather than lighter border in night mode 2020-01-26 18:16:21 +10:00
Damien Elmes
42527d0b08 add a (perhaps temporary) tts-voices: filter to show all available engines 2020-01-26 17:35:07 +10:00
Damien Elmes
47bcb3845c support speed control in tts tags 2020-01-26 14:31:07 +10:00
Damien Elmes
54626b4ae3 slightly lighter, larger night mode scrollbar 2020-01-26 10:39:53 +10:00
Damien Elmes
68dc9d1e61 fix webview button alignment on Linux
caused by the height: specification inside webview.py
2020-01-26 10:18:24 +10:00
Damien Elmes
6973df52a0 fix tags area and stats buttons in night mode 2020-01-26 09:13:38 +10:00
Damien Elmes
2d4d89d5a5 fix autoplaying of audio in preview screen, and drop extend_and_play() 2020-01-25 16:02:34 +10:00
Damien Elmes
cf815d01c5 respond to play button clicks in preview screen + card layout screen 2020-01-25 16:02:21 +10:00
Damien Elmes
b8354a919c Merge pull request #430 from glutanimate/add-reviewer-answercard-hooks
Equip Reviewer._showAnswer with hooks covering common add-on usages
2020-01-25 13:34:29 +10:00
Glutanimate
dbe8e8f6e1 Fix formatting error 2020-01-24 15:48:05 +01:00
Glutanimate
b1cecb08d4 Equip Reviewer._showAnswer with hooks covering common add-on usages 2020-01-24 15:36:05 +01:00
Damien Elmes
1d78e3f5ba Merge pull request #429 from zjosua/latex-nightmode
Invert LaTeX in night mode
2020-01-24 17:37:12 +10:00
Damien Elmes
99ccabf7c1 Merge pull request #428 from Arthur-Milchior/unusedOptional
"unused" variable become optional.
2020-01-24 17:28:47 +10:00
Damien Elmes
4c97b3f820 case insensitive contributor compare
https://github.com/ankitects/anki/pull/428
2020-01-24 17:27:43 +10:00
Damien Elmes
405c21eda8 support min/max add-on versions in download and ankiaddon manifest 2020-01-24 17:25:52 +10:00
zjosua
9564be80d0 Invert LaTeX in night mode 2020-01-24 08:23:27 +01:00
Damien Elmes
6bbab6e9f9 move strip_av_refs() into anki.sound 2020-01-24 15:48:40 +10:00
Arthur Milchior
577b68b205 "unused" variable become optional.
Adding this parameter broke one of my add-on, see
https://github.com/Arthur-Milchior/anki-keep-model-in-add-cards/issues/1

Since those parameters are not used, setting them to None by default,
as was done in some other method, seems acceptable
2020-01-23 21:46:42 -08:00
Damien Elmes
8cfb4d47ab more changes to the template code
- _renderQA() has moved to template.py:render_card()
- dropped QAData in favour of a properly typed dict
- render_card() returns a TemplateRenderOutput struct instead of a dict
- card_did_render now takes that output as the first arg, and can
mutate it
- TemplateRenderContext now stores the original card, so it can return
a card even in the add screen case

The old mungeFields and mungeQA hook have been removed as part of this
change. mungeQA can be replaced with the card_did_render hook.
In the mungeFields case, please switch to using field_filter instead.
2020-01-24 13:44:13 +10:00
Damien Elmes
766155665b renderQA() wasn't used in the codebase 2020-01-24 11:09:38 +10:00
Damien Elmes
46c6a7f7e4 extract and flag AV tags as part of the render process
We can now show replay buttons for the audio contained in {{FrontSide}}
without having to play it again when the answer is shown.

The template code now always defers FrontSide rendering, as it wasn't
a big saving, and meant the logic had to be implemented twice.
2020-01-24 11:06:11 +10:00
Damien Elmes
e61759bf35 fix night mode tooltips 2020-01-24 07:55:14 +10:00
Damien Elmes
54d8a04e8e night mode scrollbars in webviews 2020-01-24 07:41:39 +10:00