anki/ftl/core
RumovZ f2173fddb0
Live theme changes (#1497)
* Allow theme change at runtime and add hook

* Save or restore default palette on theme change

* Update aqt widget styles on theme change

* styling fixes

- drop _light_palette, as default_palette serves the same purpose
- save default platform theme, and restore it when switching away
from nightmode
- update macOS light/dark mode on theme switch
- fix unreadable menus on Windows

* update night-mode classes on theme change

This is the easy part - CSS styling that uses standard_css or our
css variables should update automatically. The main remaining issue
is JS code that sets colors based on the theme at the time it's run -
eg the graph code, and the editor.

* switch night mode value on toggle

* expose current theme via a store; switch graphs to use it

https://github.com/ankitects/anki/issues/1471#issuecomment-972402492

* start using currentTheme in editor/components

This fixes basic editing - there are still components that need updating.

* add simple xcodeproj for code completion

* add helper to get currently-active system theme on macOS

* fix setCurrentTheme not being immediately available

* live update tag color

* style().name() doesn't work on Qt5

* automatic theme switching on Windows/Mac

* currentTheme -> pageTheme

* Replace `nightModeKey` with `pageTheme`

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2021-11-25 07:17:41 +10:00
..
actions.ftl run ftl/remove-unused.sh 2021-11-24 14:44:02 +10:00
adding.ftl Make missing cloze a warning again 2021-06-15 08:43:00 +02:00
browsing.ftl run ftl/remove-unused.sh 2021-11-24 14:44:02 +10:00
card-stats.ftl Move update logic into CardInfo.svelte 2021-10-18 09:01:24 +02:00
card-template-rendering.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
card-templates.ftl run ftl/remove-unused.sh 2021-11-24 14:44:02 +10:00
change-notetype.ftl Change Notetype UI Rework (#1499) 2021-11-24 12:09:55 +10:00
custom-study.ftl move ftl into top level ftl/ folder; make it source of truth for aqt 2020-11-18 16:20:58 +10:00
database-check.ftl move ftl into top level ftl/ folder; make it source of truth for aqt 2020-11-18 16:20:58 +10:00
deck-config.ftl run ftl/remove-unused.sh 2021-11-24 14:44:02 +10:00
decks.ftl run ftl/remove-unused.sh 2021-11-24 14:44:02 +10:00
editing.ftl run ftl/remove-unused.sh 2021-11-24 14:44:02 +10:00
empty-cards.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
errors.ftl handle notes with missing cards in browser 2021-07-22 14:58:57 +10:00
exporting.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
fields.ftl run ftl/remove-unused.sh 2021-11-24 14:44:02 +10:00
findreplace.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
importing.ftl Mention .anki can be imported with add-on 175027074 2021-08-21 15:25:04 +02:00
keyboard.ftl Add getPlatformString for making shortcuts to platform string 2021-04-22 13:04:24 +02:00
media-check.ftl avoid using literal 1 in English translations 2020-12-18 10:14:19 +10:00
media.ftl remove format separator from recording string 2020-12-16 19:44:47 +10:00
network.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
notetypes.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
preferences.ftl Live theme changes (#1497) 2021-11-25 07:17:41 +10:00
profiles.ftl Set up default language before loading profile 2020-11-21 05:29:23 +03:00
scheduling.ftl run ftl/remove-unused.sh 2021-11-24 14:44:02 +10:00
search.ftl search-invalid-flag -> search-invalid-flag-2 2021-06-02 21:49:33 +02:00
statistics.ftl run ftl/remove-unused.sh 2021-11-24 14:44:02 +10:00
studying.ftl run ftl/remove-unused.sh 2021-11-24 14:44:02 +10:00
sync.ftl tweak sync conflict message 2021-09-08 19:19:23 +10:00
undo.ftl move action names out of undo.ftl into actions.ftl 2021-05-08 17:11:54 +10:00