Commit graph

9814 commits

Author SHA1 Message Date
Damien Elmes
01af958336 Bump Mathjax version 2022-12-04 18:01:26 +10:00
Damien Elmes
89ffab5795 Fix deck options sticky hiding itself 2022-12-04 15:07:48 +10:00
Damien Elmes
0ae9ad2053 Make the NoData overlay match the normal background color 2022-12-04 14:49:04 +10:00
Damien Elmes
5448319bb0 Allow unit tests to pass even when Qt translations overridden 2022-12-04 14:25:54 +10:00
Damien Elmes
c2bc714bac Add some left/right margins to congrats page 2022-12-04 13:58:50 +10:00
Damien Elmes
db9625532b Update translations 2022-12-04 13:38:38 +10:00
Damien Elmes
abca04aecf Rework spinner buttons (#2230)
* Align spinner buttons on right

The initial rationale for splitting them up was to be more touch friendly,
but we won't be able to use them on mobile anyway due to the conflicts
with double taps zooming in. On desktop, having them apart requires more
mouse movement when overshooting, so it's better to have them in one
place.

Text is now left-aligned again, which matches our other inputs like
learning steps.

The left/right buttons have been changed to up/down, which matches our
Qt spinners, and avoids RTL concerns.

This commit also removes the border on hover/select - it caused the
left-aligned content to flicker, and didn't look correct. Perhaps we could
add it back in a better way in the future.

* Hide spinner buttons on mobile devices

Tapping on them conflicts with the page zoom gesture.

* Remove min-height on spinner buttons

* Only show spinner on hover

Since they're only useful with a mouse, and only useful when they're
under the cursor, hiding them when focused keeps things less cluttered.
2022-12-04 13:18:49 +10:00
Matthias Metelka
7f6b57c1df Add profile manager setting to force custom qt stylesheets (#2233) 2022-12-04 12:54:39 +10:00
Matthias Metelka
c34f754526 Make button color and hover gradient fit together (#2232)
* Fix QMenu item not having different color on hover

due to the color changes in #2220.

* Remove strong border on pressed Qt widgets

* Make button gradient more subtle

by changing gradient-start on hover instead of gradient-end.

* Apply QPushButton style to QSpinBox buttons

* Improve margin of QComboBox arrow

* Make button-bg same color as button-gradient-end

This makes the hover gradient more subtle.
2022-12-04 11:48:09 +10:00
Matthias Metelka
ea7faac1a3 Decrease block padding for deck browser rows (#2231) 2022-12-04 11:45:59 +10:00
Damien Elmes
8b1e3bf6f2 Partially revert #2215
This fixes the issues mentioned on 
https://forums.ankiweb.net/t/anki-2-1-55-beta-5/24870/78

I can't seem to reproduce the extra tag being added when auto-completing
anymore, but perhaps I'm just not getting the steps right.
2022-12-04 11:37:16 +10:00
Damien Elmes
aebf9652a7 Add env var to enable sourcemaps
They slow down the build, so are not on by default.
2022-12-04 11:37:16 +10:00
Damien Elmes
805d997a69 Skip minify in debug builds 2022-12-04 10:05:16 +10:00
Damien Elmes
8e83ed45e9 Ensure certifi refresh repeats 2022-12-03 23:31:08 +10:00
Damien Elmes
9b056bb55c Revert "Probable workaround for mpv failing after a few days on macOS"
This reverts commit 30d9b819f9.

Issue turned out to be a packaging problem, and this should not be
required as the socket should be held open even if removed.
2022-12-03 23:30:19 +10:00
Damien Elmes
de0b24f745 Fix mpv being placed in incorrect bundle location on macOS 2022-12-03 23:29:26 +10:00
Damien Elmes
819d16e9b6 Revert "Reset zoom on page transition"
This reverts commit e2dcc49284.

There have been a number of people complaining that the current
behaviour is not intuitive, and they have a point - it's not the
way browsers behave when you navigate between pages.
2022-12-03 23:14:45 +10:00
Damien Elmes
5b3abe537a Revert to old select in change notetype screen for now
Fixes https://forums.ankiweb.net/t/anki-2-1-55-beta-5/24870/25,
introduced in #2082
2022-12-03 23:04:08 +10:00
Damien Elmes
04ba7e5569 Fix typed text not being saved if saving immediately
https://forums.ankiweb.net/t/anki-2-1-55-beta-5/24870/43
2022-12-03 22:41:17 +10:00
Damien Elmes
85fc60843e Fix alternate table row color on macOS
https://forums.ankiweb.net/t/anki-2-1-55-beta-3/24295/102
2022-12-03 22:21:22 +10:00
Damien Elmes
30d9b819f9 Probable workaround for mpv failing after a few days on macOS
Also fix the certifi bumper: it was supposed to repeat
2022-12-03 22:11:39 +10:00
Damien Elmes
d633a7b926 Fix formatting inside selection not being removed
Regression introduced in #2017 while fixing another bug.

Closes #2072
2022-12-03 21:41:54 +10:00
Damien Elmes
296ba2fe32 Try to address crashes on shutdown
I was able to reproduce the crashes fairly reliably by opening the
prefs screen on startup and shutting down the app after 600ms; after
this change the crashes no longer seem to occur.
2022-12-03 19:33:51 +10:00
Damien Elmes
8e5f2eb137 Stop removing build file
Since we reconfigure automatically, this should no longer be necessary.
2022-12-03 19:32:07 +10:00
RumovZ
530e28ac91 Cap calculated hard delay secs at again delay + 1d (#2229) 2022-12-03 18:54:40 +10:00
Damien Elmes
e9719e03d2 Automatically regenerate build.ninja and re-run when build fails quickly 2022-12-01 19:40:49 +10:00
Matthias Metelka
d034a84a64 Refactor Select component | Fix CSV import issue (#2227)
* Refactor Select component and implement/update it in various screens

* Remove redundant select CSS

* Tweak DeckOptionsPage

* Fix CSV import layout

* Fix save button margin in change notetype screen

* Fix sticky header positioning

* Remove unused imports

* Make StickyHeader sticky instead of fixed
2022-12-01 19:24:26 +10:00
Matthias Metelka
a8a1bbd710 Use third grid column in graphs layout on wide screens (#2226)
* Use third grid column on graphs page when width > 1400px

* Define column width more precisely

* Center graphs inside containers

* Fix graphs always showing 2+ columns (dae)
2022-12-01 16:33:52 +10:00
Matthias Metelka
da85477375 Tweak scrollbar colors for better visibility in dark theme (#2225) 2022-12-01 16:15:17 +10:00
Matthias Metelka
9aee451ae5 Fix glitchy animation of floating elements (#2224)
* Set max-height of 400px to scrollable Popover

* Pass computed placement to user components

to set different animation directions when the placement changes.

* Move elevation effect from WithFloating/WithOverlay to Popover

* Apply same changes as in WithFloating to WithOverlay

* Adjust FloatingArrow CSS to Popover

* Run eslint and formatter
2022-12-01 15:45:52 +10:00
Matthias Metelka
a112c9d9b7 Refactor SpinBox component (#2223)
this fixes the increment button not showing.
2022-12-01 15:34:54 +10:00
Damien Elmes
1bb6afb394 Avoid setting RTL on first run
I'm not sure why, but this seems to address the first issue mentioned on
https://forums.ankiweb.net/t/anki-2-1-55-beta-5/24870/58
2022-11-30 19:19:22 +10:00
Damien Elmes
5311210849 Fix cargo-deny exclusion 2022-11-30 13:52:49 +10:00
Damien Elmes
5168eed79a Enable cargo-deny in CI
We have quite a few duplicate crate deps at the moment, so those warnings
are currently disabled.
2022-11-30 13:20:50 +10:00
Damien Elmes
bb65daf8fd Update incompatible crates 2022-11-30 12:38:10 +10:00
Damien Elmes
9cf6a1f2d7 Pin chrono; update compatible Rust crates
Also pin reqwest in our other crates
2022-11-30 12:38:10 +10:00
Damien Elmes
61869250ce Add cargo-deny config
Not currently enabled in CI; will probably want to exclude the duplicates
from the warnings.
2022-11-30 12:38:10 +10:00
Damien Elmes
aab5861ac6 Use workspace package info in more crates; mark private for cargo-deny 2022-11-30 12:19:56 +10:00
Damien Elmes
8e0ee157f6 Remove unused cargo config in qt/bundle 2022-11-30 11:37:20 +10:00
Matthias Metelka
dd6353a761 Give containers brighter color than canvas (#2220)
* Give deck browser table an elevated container look

* Tweak colors of elevated containers (e.g. in deck options)

* Prepare editor fields for custom backgrounds

* Tweak field margin and add explanatory comment
2022-11-29 17:54:42 +10:00
Damien Elmes
0715326cc6 Fix typechecking error on Windows 2022-11-29 13:28:57 +10:00
Damien Elmes
10a6e6f9d0 Fix TTS handling on Windows
Also update to winsdk, which unblocks Python updates on Windows
2022-11-29 13:04:51 +10:00
Damien Elmes
a2bfbe2085 Update translations 2022-11-28 20:58:14 +10:00
BlueGreenMagick
f550a737e8 use BUTTON_BG for button background (#2217) 2022-11-28 20:53:07 +10:00
Matthias Metelka
c81463b22f Use less specific html selector to not override user CSS (#2218) 2022-11-28 20:52:19 +10:00
Damien Elmes
94117603c7 Fix clippy warning 2022-11-28 14:42:03 +10:00
Damien Elmes
c7445f76b1 Fix submodule sync when nested in another repo on Windows 2022-11-28 14:37:50 +10:00
Damien Elmes
b9008a4a74 Re-enable formatting for .ts files
There are some style differences compared to prettier, and not all are
necessarily an improvement, but it's much faster now.
2022-11-28 09:33:04 +10:00
Damien Elmes
830cc8fc94 Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00
Damien Elmes
cd8b5f1b4c Re-enable formatting for .toml files 2022-11-28 09:16:28 +10:00