Damien Elmes
bb30e8f7bc
use constants for other color references
...
str_color/qcolor() doesn't appear to have been used by any add-ons
except one of mine, so changing the signature should be safe
2021-02-05 18:58:22 +10:00
Damien Elmes
b8d67cdad5
move remaining Filter button items into sidebar
...
- Closes #976
- Added helper to apply arbitrary colour to an icon.
- Fix #979 - low res icons in night mode.
- The icons and colours are not perfect - please feel free to send
through a PR if you can improve them.
- Convert colors dictionary into module consts, so we can
use code completion.
- Added "Edited Today" and "Due Tomorrow"
- Rename camelCase attribute to snake_case and tweak the wording
of some enum constants. We've already broken compatibility with the
major sidebar add-ons, so we may as well make these changes while we
can.
- Removed Filter button. Currently there is no exposed way to toggle
the Sidebar off - wonder if we still need it?
2021-02-05 18:58:22 +10:00
Damien Elmes
bd730a012e
replace sidebar filter shortcut with existing Filter button shortcut
2021-02-05 14:32:56 +10:00
Damien Elmes
a602f0342c
fix Qt translations in macOS packaged build
2021-02-04 20:28:25 +10:00
Damien Elmes
3c1fa68460
turn top bar dark when night mode enabled on macOS
2021-02-04 19:19:56 +10:00
Damien Elmes
39c6429fe2
fix broken card styling fix :-)
2021-02-03 22:32:55 +10:00
Damien Elmes
7e8886c352
fix broken card styling
2021-02-03 22:22:12 +10:00
Damien Elmes
168963460f
update to latest mypy_protobuf
...
The handling of enum types has improved - we no longer need to import
separate types at typechecking time.
2021-02-03 13:31:52 +10:00
Damien Elmes
86f8cba22c
Merge pull request #972 from hgiesel/ephemeral
...
Move ephemeral card functionality from clayout to Note class
2021-02-03 13:10:00 +10:00
Damien Elmes
e683e5c4d7
Merge pull request #973 from hgiesel/mathjaxerror
...
Render error if MathJax raises error
2021-02-03 13:09:12 +10:00
Henrik Giesel
e5587ffa59
Move copy_page to ts/copy.bzl and rename to copy_files_into_group
2021-02-02 18:20:11 +01:00
Henrik Giesel
803d6fbd3b
Render error if MathJax raises error
2021-02-02 18:11:16 +01:00
Henrik Giesel
22a5db8ace
Remove unused imports
2021-02-02 17:13:35 +01:00
Henrik Giesel
2483ef4517
Use new note.ephemeral_card method in clayout
2021-02-02 16:47:25 +01:00
Damien Elmes
4a5ef69068
add remaining types and disable missing types on (almost) all aqt
2021-02-03 00:00:29 +10:00
Damien Elmes
6426edb0ac
more typing updates
2021-02-02 23:31:55 +10:00
Damien Elmes
4b112950b8
Merge pull request #971 from abdnh/sidebar-checkpoints
...
Add checkpoints for sidebar drag & drop routines
2021-02-02 22:28:53 +10:00
Damien Elmes
33319e1691
Merge pull request #970 from RumovZ/cleanup-967
...
Cleanup 967
2021-02-02 22:03:43 +10:00
abdo
2754464147
Add checkpoints for sidebar drag & drop routines
...
Also save note and reset browser model
2021-02-02 14:58:44 +03:00
Damien Elmes
7e22bc16bc
fix: Qt translations not working
...
Will need to manually confirm this is working in the bundled builds
2021-02-02 21:12:28 +10:00
RumovZ
2499f2ae34
Remove standard button translations
2021-02-02 11:57:35 +01:00
Damien Elmes
4330ab58f5
auto-expand items while dragging
2021-02-02 20:14:14 +10:00
Damien Elmes
a50601ed46
add tag drag & drop support
2021-02-02 20:14:04 +10:00
Damien Elmes
dd54c10e71
Merge pull request #968 from abdnh/sidebar-expand-matches
...
Expand sidebar match trees one level
2021-02-02 19:03:04 +10:00
Damien Elmes
467064f873
collapsed->expanded in other tag uses for consistency
2021-02-02 18:52:57 +10:00
Damien Elmes
52b256663f
collapsed->expanded in TagTreeNode
2021-02-02 18:52:57 +10:00
RumovZ
14775445df
Add docstring to browser.__ini__
2021-02-02 09:48:55 +01:00
RumovZ
16462941ab
Remove actionCreateFilteredDeck2 and use modifier
2021-02-02 09:29:09 +01:00
Damien Elmes
0bf2538989
remove sidebar margins
2021-02-02 16:35:42 +10:00
Damien Elmes
7fc32db0c9
fix: slowdowns after import; hard to read popup
...
QTextEdit() will pin the CPU at 100% for seconds to minutes when
fed a large string to display - work around it by switching to
QPlainTextEdit().
Also strip HTML before showing the user - easier to read, and less
text to display. And turn off word wrap, as it makes it easier to skim,
and further reduces the work the widget needs to do.
https://forums.ankiweb.net/t/big-issue-where-anki-gets-slow-when-you-import-this-deck/7050
2021-02-02 15:49:47 +10:00
abdo
ee1ed033a2
Hide sidebar items when there is no match
2021-02-02 05:41:45 +03:00
abdo
6f5d1bca3f
Add more sidebar section roots
2021-02-02 04:51:45 +03:00
Damien Elmes
b7bfe58afe
fix sync warning caused by mistake in typing work
2021-02-02 10:43:49 +10:00
Damien Elmes
3a8fce69dd
ditch QSortFilterProxyModel in favour of our own code
...
Simpler and approximately twice as fast in a large collection:
old approach
search for a: 371ms
search for an: 260ms
new approach:
search for a: 171ms
search for an: 149ms
Still todo: add enum defs for the other root categories, update
the _section_root() calls, and update is_expanded() to use the new
extra types
2021-02-02 10:40:50 +10:00
RumovZ
b450c8d45c
Add remaining type hints to dyndeckconf etc.
2021-02-01 23:46:56 +01:00
RumovZ
c18af2a0a9
Merge branch 'master' into dyn-deckconf
2021-02-01 23:33:41 +01:00
RumovZ
2ddb4edbb0
Rename standard buttons to have transaltions
2021-02-01 23:20:57 +01:00
RumovZ
6c7b195da8
Make browser links unfocusable
...
Since Enter would trigger Accept anyway, there is no point in them
having focus.
2021-02-01 21:17:15 +01:00
RumovZ
4666ba8b70
Enable renaming from dyndeck dialogue
2021-02-01 21:02:22 +01:00
RumovZ
8065e73ef8
Add cross links for second dyndeck filter
2021-02-01 19:10:05 +01:00
RumovZ
0d37254238
Style browser-from-filtered-deck button
...
Use theme color and add hover effect.
2021-02-01 18:01:57 +01:00
abdo
c96248d67f
Expand sidebar match trees one level
...
See 132bb5ff36
2021-02-01 19:12:43 +03:00
Damien Elmes
a56b09b987
add a bunch of return types
2021-02-01 23:53:23 +10:00
RumovZ
4d097b995d
Add button in dynDeckConf to search in browser
2021-02-01 13:55:03 +01:00
Damien Elmes
f15715fb07
add types to various other files
...
Mainly automated with MonkeyType
2021-02-01 22:08:56 +10:00
RumovZ
0949cdc73e
Rename "Filtered Deck from Current Filter"
2021-02-01 12:09:37 +01:00
Damien Elmes
84f8d7f604
add some types to main.py
2021-02-01 20:59:18 +10:00
RumovZ
6b1d5f14e8
Change filtered-deck shortcut in browser to Ctrl+G
2021-02-01 11:59:16 +01:00
RumovZ
6de6e5f339
Make browser accept optional args and add reopen
...
That way, the caller doesn't have to hold a reference to the browser and
explicitly call it again, if it wants to search for something specific.
Also, if the browser was closed and opened for a single-card-search, it
now won't perform a redundant current-deck-search first.
2021-02-01 11:54:28 +01:00
Damien Elmes
98f4b3db81
add types to utils.py
...
The function signatures for things like getFile() are awful, but
sadly are used by a bunch of add-ons.
2021-02-01 20:23:48 +10:00