Commit graph

9671 commits

Author SHA1 Message Date
Matthias Metelka
ff36297456
Merge branch 'redesign-test' into custom-qt-controls 2022-09-04 15:57:58 +02:00
Matthias Metelka
bbab485373
Merge branch 'main' into color-palette 2022-09-04 15:51:55 +02:00
Matthias Metelka
6bb45355d1 Remove reimport of Any 2022-09-04 15:49:56 +02:00
Matthias Metelka
72c7cb674a Use isinstance for comparison 2022-09-04 15:47:32 +02:00
Matthias Metelka
cdfa6ebd40 Adjust padding of QComboBox and its drop-down arrow 2022-09-04 15:33:29 +02:00
Matthias Metelka
3fdbd95e40
Merge branch 'main' into custom-qt-controls 2022-09-04 14:40:50 +02:00
Matthias Metelka
29d3156d3d Add type annotations to eventFilter 2022-09-04 14:38:26 +02:00
Matthias Metelka
c8aa72fa1c Tweak webview button borders 2022-09-04 14:09:22 +02:00
Matthias Metelka
4e8c7e819f Apply styles to all platforms
mainly so people like @hgiesel can easily test the widget style overrides, but maybe you actually prefer them over the native ones, who knows :)
2022-09-04 14:01:02 +02:00
Matthias Metelka
123e2377de Merge branch 'main' into custom-qt-controls 2022-09-04 13:57:24 +02:00
Matthias Metelka
74d06241da Tweak disabled state of SpinBox button 2022-09-04 13:56:48 +02:00
Matthias Metelka
b4101d9d97 Add blue colors for primary buttons 2022-09-04 13:38:30 +02:00
Matthias Metelka
970148e231 Make webview scrollbar look identical to Qt one 2022-09-04 13:38:05 +02:00
Matthias Metelka
86b78256f7 Create stylesheet overrides for various Qt widgets
Including QPushButton, QComboBox, QSpinBox, QLineEdit, QListWidget, QTabWidget, QTreeWidget, QToolTip, QTableView, QScrollBar and sub-widgets.
2022-09-04 11:34:03 +02:00
Matthias Metelka
35650e0f69 Adjust gray tones 2022-09-03 14:44:07 +02:00
Matthias Metelka
2d1849549b Dark theme: use less saturated flag colors 2022-09-03 10:25:12 +02:00
Matthias Metelka
e2193950a9
Add animation toggle to preferences (#2041)
* Add animation toggle to preferences

and move settings affecting appearance together.

* Add class to body if animations unchecked

* Fix formatting in preferences.ftl

* Update duration(height) function for Collapsible transition

and add explanation.

* Fix formatting

* Increase duration baseline to 10 and decrease factor to 20

* Restore initial layout and rename option to "Reduce motion"

* Move checkboxes together and fix tab order (dae)

+ Remove separation of UI size
2022-09-03 12:14:47 +10:00
RumovZ
1f8189fe91
Some import/export features and fixes (#2038)
* Keep filtered decks when importing apkg

If all original decks exist and scheduling is included.

* Create missing decks from csv

* Export original decks if with_scheduling

* Also remap original deck ids on import

* Update imported filtered decks

* Fix meta column being mapped to tags

* Fix ids in csv deck and notetype columns

Note: This implies names which parse to an i64 will be seen as ids,
likely resulting in the intended deck/notetype not being found.

* Check for scheduling with revlog and deck configs

Might help with cases in which scheduling was included, but all cards
are new. In such a case, filtered deck should not be converted.

* Fix duplicate with same GUID being created

* Remove redundant `distinct`s from sql query

* Match notes by _either_ guid _or_ first field

* Refactor to emphasise GUID/first field distinction

* Export default deck and config if with scheduling

* Fix default deck being exported if it's a parent
2022-09-03 11:29:06 +10:00
Matthias Metelka
7242501db3 Fix PlainTextInput not expanding 2022-09-02 20:46:36 +02:00
Matthias Metelka
6295f50587
Merge branch 'main' into color-palette 2022-09-02 19:05:58 +02:00
Matthias Metelka
7243a9c091 Dark theme: make border-faint darker than canvas-default
meaning two shades darker than it currently was.
2022-09-02 19:02:31 +02:00
Matthias Metelka
3d896b5949 Tweak inset shadow color 2022-09-02 18:57:36 +02:00
Matthias Metelka
98e7c37eaa Dark theme: make border-default one shade darker 2022-09-02 18:56:55 +02:00
Matthias Metelka
e39a3edeab Experiment with inset look for fields again
Is this too dark in night mode? It's the same color used for all other text inputs.
2022-09-02 18:25:37 +02:00
Matthias Metelka
d3fa137e1c Tweak card/note accent colors 2022-09-02 17:39:46 +02:00
Matthias Metelka
c5f9e9954b Reduce flag colors to single default value 2022-09-02 17:35:48 +02:00
Matthias Metelka
7d45b65ebe Light theme: darken background and flatten transition
also set hue and saturation of gray-8 to 0 (like all the other grays).
2022-09-02 15:55:23 +02:00
Matthias Metelka
690cc04edd Add back box-shadow to EditingArea 2022-09-02 15:53:58 +02:00
Matthias Metelka
98ed2813cc Adjust light theme 2022-09-02 15:28:47 +02:00
Matthias Metelka
a7c1cdfa2d Use canvas-inset variable for switch knob 2022-09-02 15:28:35 +02:00
Matthias Metelka
decfa16df2 Light theme: decrease brightness of canvas-default and adjust fg-default 2022-09-02 12:49:37 +02:00
Damien Elmes
8cf829d442 Update translations 2022-09-02 15:04:10 +10:00
RumovZ
31b7464c67
Add card meta for persisting custom scheduling state (#2040)
* Add card meta for persisting custom scheduling state

* Rename meta -> custom_data

* Enforce limits on size of custom data

Large values will slow down table scans of the cards table, and it's
easier to be strict now and possibly relax things in the future than
the opposite.

* Pack card states and customData into a single message

+ default customData to empty if it can't be parsed

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2022-09-02 11:22:49 +10:00
Matthias Metelka
d9e2d7d3eb
Break long words in pre tags (#2045)
* Break long words in pre tags

* Move rule to editable-base.scss
2022-09-01 23:31:47 +10:00
Matthias Metelka
53293284c9
Break long words in CodeMirror (#2044)
* Break long words in CodeMirror

Credit to Marko Letic: https://stackoverflow.com/a/57377527

* Move rule to more general CodeMirror component
2022-09-01 23:30:17 +10:00
RumovZ
52b4e3ad16
Document Protocol Buffers used in Anki (#2042)
* Document Protocol Buffers used in Anki

* Fix typos

* Correct notes about Rust crate
2022-09-01 22:01:14 +10:00
Matthias Metelka
e4f3f9bf41
Merge branch 'main' into color-palette 2022-08-31 22:07:22 +02:00
Matthias Metelka
ac928225f9 Showcase use of palette-of function
The #{...} syntax is required only because the use cases are CSS var definitions. In other cases a simple palette-of(keyword, theme) would suffice.
2022-08-31 21:21:54 +02:00
Matthias Metelka
cd726049a1 Return CSS var by default and add palette-of function for raw value 2022-08-31 21:19:53 +02:00
Matthias Metelka
d110c4916c
Introduce setting to collapse field by default (#1990)
* Introduce setting to collapse field by default

* Fix schema order

* Change wording from adjective to imperative

sounds a bit less clunky

* Update rslib/src/notetype/schema11.rs (dae)

* Keep settings in single column

* Add back Toggle Visual Editor string

* Add RichTextBadge component and show it conditionally

* Reverse input order depending on default setting

* Make PlainTextInput border-radius responsive to toggle states

* Prevent first Collapsible transition differently

* Focus inputs after Collapsible transition

The double tick calls are just a temporary solution until I find the exact moment an input is focusable again.

* Use requestAnimationFrame to await focusable state

Note: Svelte tick doesn't seem to work in this scenario.
2022-08-31 23:34:39 +10:00
Sam Penny
65601196ee
add shortcut to close addcards window (#2031) 2022-08-31 20:09:09 +10:00
gnnoh
e4f1d9952b
Make dvipng use transparent background by default (#2036)
* make dvipng use transparent background by default

Note that if using all-lowercase 'transparent', it will give "a simple fully transparent background with non-transparent antialiased pixels", which is unnecessary.

* latex.py: format
2022-08-31 18:49:22 +10:00
wallgrenen
0eaa80dd28
change update link to point to download section (#2034) 2022-08-31 18:35:53 +10:00
BlueGreenMagick
28eae0667a
fix wrong rich-text-widget offset (#2033)
.rich-text-input { padding: 6px; }
messed up image & mathjax overlay positioning
because parent padding isn't added to absolute positioning px
2022-08-31 18:35:01 +10:00
Matthias Metelka
1498ba2c29 Use old --frame-bg color and use darker tone for canvas-default 2022-08-30 19:17:11 +02:00
Matthias Metelka
98f8ab7344 Improve uses of default-themed variables 2022-08-30 18:54:25 +02:00
Matthias Metelka
cb4afed825
Merge branch 'main' into color-palette 2022-08-30 18:17:38 +02:00
Matthias Metelka
4881f16eba Add vars_lib as dependency to base_lib and button_mixins_lib 2022-08-30 18:15:50 +02:00
Matthias Metelka
ac0d2c8954 Add functions and colors to base_lib 2022-08-30 17:56:00 +02:00
Matthias Metelka
7451b67f2a Tweak light theme border and shadow colors 2022-08-30 17:42:12 +02:00