anki/ts/graphs
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
..
added.ts Set "no-non-null-assertion: off" by default (#1475) 2021-11-04 11:42:51 +10:00
AddedGraph.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
AxisTicks.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
BUILD.bazel pass ts deps into most Svelte packages; remove redundant deps 2021-10-18 12:44:31 +10:00
buttons.ts Set "no-non-null-assertion: off" by default (#1475) 2021-11-04 11:42:51 +10:00
ButtonsGraph.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
calendar.ts Set "no-non-null-assertion: off" by default (#1475) 2021-11-04 11:42:51 +10:00
CalendarGraph.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
card-counts.ts Set "no-non-null-assertion: off" by default (#1475) 2021-11-04 11:42:51 +10:00
CardCounts.svelte Garbage collect unused Fluent strings (#1482) 2021-11-12 18:19:01 +10:00
CumulativeOverlay.svelte yarn upgrade --latest 2021-10-01 12:52:53 +10:00
ease.ts Set "no-non-null-assertion: off" by default (#1475) 2021-11-04 11:42:51 +10:00
EaseGraph.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
future-due.ts Set "no-non-null-assertion: off" by default (#1475) 2021-11-04 11:42:51 +10:00
FutureDue.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
graph-helpers.ts Set "no-non-null-assertion: off" by default (#1475) 2021-11-04 11:42:51 +10:00
graph-styles.ts merge in Henrik's TS/Svelte refactor with some changes 2021-03-21 23:01:18 +10:00
Graph.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
GraphRangeRadios.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
graphs-base.scss Several CSS fixes - Editor Cleanup (#1470) 2021-10-31 08:29:22 +10:00
graphs.html Use trailingComma: all setting in .prettierrc (#1435) 2021-10-19 09:06:00 +10:00
GraphsPage.svelte Live theme changes (#1497) 2021-11-25 07:17:41 +10:00
histogram-graph.ts Set "no-non-null-assertion: off" by default (#1475) 2021-11-04 11:42:51 +10:00
HistogramGraph.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
HourGraph.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
hours.ts Set "no-non-null-assertion: off" by default (#1475) 2021-11-04 11:42:51 +10:00
HoverColumns.svelte yarn upgrade --latest 2021-10-01 12:52:53 +10:00
index.ts Live theme changes (#1497) 2021-11-25 07:17:41 +10:00
InputBox.svelte yarn upgrade --latest 2021-10-01 12:52:53 +10:00
intervals.ts Set "no-non-null-assertion: off" by default (#1475) 2021-11-04 11:42:51 +10:00
IntervalsGraph.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
NoDataOverlay.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
RangeBox.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
reviews.ts Set "no-non-null-assertion: off" by default (#1475) 2021-11-04 11:42:51 +10:00
ReviewsGraph.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
TableData.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
today.ts Use trailingComma: all setting in .prettierrc (#1435) 2021-10-19 09:06:00 +10:00
TodayStats.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
Tooltip.svelte update ts deps 2021-05-26 09:37:40 +10:00
tooltip.ts update ts deps 2021-05-26 09:37:40 +10:00
tsconfig.json add a missing references line in ts/graphs 2021-11-04 14:56:50 +10:00
WithGraphData.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00