Commit graph

9957 commits

Author SHA1 Message Date
Matthias Metelka
fd43346c28 Fix typing issue 2023-01-14 11:22:34 +01:00
Matthias Metelka
fd6afffdcc Fix hide mode dropdown ignoring checkbox state on startup 2023-01-14 11:21:04 +01:00
Matthias Metelka
3d02c7858d Rename full screen option 2023-01-14 11:15:11 +01:00
Matthias Metelka
fa057df818 Allow users to make hiding exclusive to full screen 2023-01-14 11:15:11 +01:00
Matthias Metelka
09dc6a2ac6 Collapse toolbars with slight delay when moving to review state
This should ensure the bottom toolbar collapses too.
2023-01-14 09:58:21 +01:00
Matthias Metelka
f4c4eb6adb Increase hide timer interval to 2s 2023-01-14 09:58:21 +01:00
Matthias Metelka
5aa7b240a5 Merge branch 'qt-widget-gallery' of https://github.com/kleinerpirat/anki into qt-widget-gallery 2023-01-14 03:46:44 +01:00
Matthias Metelka
5d276df334 Reduce theme check interval to 5s on Linux 2023-01-14 03:46:16 +01:00
Matthias Metelka
78481cbd50
Merge branch 'main' into qt-widget-gallery 2023-01-14 03:39:22 +01:00
Matthias Metelka
1346ffa526 Fix some issues 2023-01-14 03:38:47 +01:00
Matthias Metelka
8964942305 Tweak buttons in minimalist mode 2023-01-14 03:27:13 +01:00
Matthias Metelka
506a9ad208 Remove dynamic toolbar background from minimalist mode 2023-01-14 03:20:44 +01:00
Matthias Metelka
d4adde9091 Undo TitledContainer changes
since nobody asked for that
2023-01-14 03:19:55 +01:00
Matthias Metelka
9f5c3de28a Tweak deck overview appearance in minimalist mode 2023-01-14 03:19:33 +01:00
Matthias Metelka
c3647e2d3e Sort imports 2023-01-14 03:09:17 +01:00
Matthias Metelka
e3d11e278e Implement proper full-screen mode 2023-01-14 03:06:56 +01:00
Matthias Metelka
08f02e441d Remove unused lines 2023-01-14 02:02:39 +01:00
Matthias Metelka
8018c1dcae Move toolbar settings above minimalist modes 2023-01-14 01:58:35 +01:00
Matthias Metelka
ef54865a2c Add setting to hide bottom toolbar 2023-01-14 01:56:19 +01:00
Matthias Metelka
e5a946bb1a Reorder preferences 2023-01-14 01:55:13 +01:00
Hikaru Y
604e0f46e1
Fix and refactor image size constraints (#2318)
* Remove 'ResizableImage.svelte'

Rather than having a svelte file that just sets global styles, it's
better to set those in a (s)css file.

* Fix and refactor image size constraints

- Fixes https://forums.ankiweb.net/t/2-1-56-image-size-problem-in-editor/26207
- Use :host-context() to switch image styles instead of toggling CSS
variables.

* Fix toolbar buttons for image overlay sometimes being cut off
2023-01-13 23:18:25 +10:00
Damien Elmes
8131ea1908 Fix quotes breaking field descriptions, and prevent content injection
https://forums.ankiweb.net/t/some-field-descriptions-are-not-showing/26295
2023-01-13 16:37:49 +10:00
Matthias Metelka
003d3a39c7 Fix toolbar styles 2023-01-13 00:10:19 +01:00
Matthias Metelka
212a4ca2e1 Highlight QCheckBox and QRadioButton when focused 2023-01-12 22:58:32 +01:00
Matthias Metelka
352e2b4aa2 Fix QTabView focused tab style 2023-01-12 22:54:27 +01:00
Matthias Metelka
cf58470052 Remove unused layout from Preferences 2023-01-12 22:54:00 +01:00
Matthias Metelka
f1d9460a1f Fix QTableView background 2023-01-12 22:42:24 +01:00
Matthias Metelka
decfbd6698 Add missing styles for QPushButton states 2023-01-12 22:42:05 +01:00
Matthias Metelka
a4541997af Indent QTabBar style definitions 2023-01-12 22:41:18 +01:00
Matthias Metelka
9f6db2c208 Revamp preferences, add minimalist mode
Also:
- create additional and missing widget styles and tweak existing ones
- use single profile entry to set widget styles and reduce choices to Anki and Native
2023-01-12 20:33:53 +01:00
Matthias Metelka
0e559bff8b Add another border-radius value
and make former large radius a bit smaller.
2023-01-12 19:53:28 +01:00
Matthias Metelka
3d8c4ead8f Rename "reduced-motion" to "reduce-motion" 2023-01-12 19:51:42 +01:00
Matthias Metelka
9373e1fbd0
Merge branch 'main' into qt-widget-gallery 2023-01-12 08:28:38 +01:00
Matthias Metelka
df456e959d
Make QCheckBox more visible (#2314) 2023-01-12 09:16:38 +10:00
Damien Elmes
10fd465edb Increase delay for mutter
It's a nasty hack, and would be nice if we could easily limit it to
users who are using Mutter.
2023-01-11 19:59:34 +10:00
Matthias Metelka
4c76bc4b0d
Merge branch 'main' into qt-widget-gallery 2023-01-11 09:33:19 +01:00
dependabot[bot]
b5cca03d09
Bump bzip2 from 0.4.3 to 0.4.4 (#2310)
Bumps [bzip2](https://github.com/alexcrichton/bzip2-rs) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/alexcrichton/bzip2-rs/releases)
- [Commits](https://github.com/alexcrichton/bzip2-rs/commits/0.4.4)

---
updated-dependencies:
- dependency-name: bzip2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-11 12:58:35 +10:00
Matthias Metelka
ba822d9ee9
Simplify padding definition and center text (#2308) 2023-01-11 12:58:02 +10:00
Damien Elmes
5db95c97e3 Fix incorrect added total/average
https://forums.ankiweb.net/t/anki-2-1-56-release-candidate/26001/18
2023-01-10 09:45:54 +10:00
Hikaru Y
25def4f741
Fix spaces not handled properly when entering text around MathJax (#2307)
Regressed in #2288
https://forums.ankiweb.net/t/2-1-56-qt6-pressing-space-after-mathjax-inserts-nbsp-with-escaped/26147
2023-01-10 08:51:09 +10:00
RumovZ
6df7be90c5
Fix negated introduced:x search (#2306)
1. Add outer brackets.
2. Coalesce aggregate, because `null and true` is `null` in SQL land,
so cards that were not introduced, but manually rescheduled in the
period of interest, would not show up in a negated search.
2023-01-10 08:49:35 +10:00
Aristotelis
91d563278f
Fix toolbar add-on breakages and introduce toolbar tray layout & API (#2301)
* Layout toolbar using CSS grid, introducing left and right trays

The trays provide a space for add-ons to introduce their own widgets to the toolbar without interfering with each other.

* Align tray items to the top

* Move absolutely positioned add-on items to right toolbar tray

Workaround that fixes breakages in add-ons like AMBOSS, Study Timer, and potentially others that currently still inject absolutely positioned elements into the toolbar using `top_toolbar_did_init_links`.

* Account for add-ons that add manual padding (e.g. Study Timer)

* Add docstrings and slightly refactor

* Tweak item alignment

* Introduce hooks for extending left and right toolbar trays

* Assign CSS classes to all tray items

* Add disclaimer on transitional nature of new hooks
2023-01-10 08:48:50 +10:00
Damien Elmes
cef672a6a1 Update Windows/Linux to Qt 6.4.2
Closes #2275
2023-01-09 16:22:47 +10:00
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
Damien Elmes
afca2f52ce Update translations 2023-01-09 11:09:02 +10:00
Damien Elmes
3b0fd7b3eb Bump version 2023-01-09 11:08:53 +10:00
Damien Elmes
07fd88ddea Allow timestamps to be a day ahead
https://github.com/ankitects/anki/issues/1895#issuecomment-1374574230
2023-01-09 10:04:48 +10:00
dependabot[bot]
4e92c29815
Bump tokio from 1.23.0 to 1.23.1 (#2303)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.23.0 to 1.23.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.23.0...tokio-1.23.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-07 10:01:56 +10:00
Damien Elmes
7f71277514 Whitelist dependabot 2023-01-07 09:53:29 +10:00
Damien Elmes
309c467403 Work around button margins being too thin on Windows 2023-01-05 17:15:10 +10:00