* add SaveCustomColours rpc method
* restore custom colour palette on editor init
* save custom colour palette on colour picker open and input
there doesn't seem to be an event fired when the picker is
cancelled/closed, so it's still possible for work to be lost
* save colours on `change` instead of `input`
`input` is supposed to be fired on every adjustment to the picker
whereas `change` is only fired when the picker is accepted, but qt
seems to treat both as the latter, so this is currently a no-op
* Store colors in the collection
One minor tweak to the logic while I was there: an invalid color no
longer invalidates all the rest.
---------
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
* Improved margins in Card Browser's "Preview" pane
* Alternate approach that looks good on Mac too
---------
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
* Make timebox message translatable with flexible variable order
Currently, the timebox dialog message is built from two separate strings,
each containing one variable:
"{ $count } cards studied in" + "{ $count } minutes."
As a result, translators cannot freely reorder the variables in their translations.
This change introduces a single string with both variables, allowing translators
to adjust the order for more natural expressions in their languages.
* Preserve old string for now
* Ensure message doesn't display over two lines
---------
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
With all the recent supply chain attacks, this seems prudent. There are
three in our current package list. esbuild's is just a performance
optimization (https://github.com/evanw/esbuild/issues/4085), and
dprint's gets done when we invoke .bin/dprint anyway. svelte-preprocess
simply prints something to the screen.
* Enable nc: to only search in a specific field
* Add FieldSearchMode enum to replace boolean fields
* Avoid magic numbers in enum
* Use standard naming so Prost can remove redundant text
---------
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
rust commit 8296ad0 changes the output of std::any::type_name to include
regions such as lifetime and generic arguments, which results in invalid
Ninja rule names being generated, such as `CargoBuild<_>`.
* Increase randomness in random sorting of new cards
Currently, the new cards appear roughly in the same order on consecutive days (if they are skipped by burying). This change aims to increase randomness by spreading out the salt across the hash space.
* Fix errors