more legible graph colours in night mode

This commit is contained in:
Damien Elmes 2020-02-07 13:19:41 +10:00
parent 1fa1c4eb07
commit 5b01f0dad1
2 changed files with 10 additions and 1 deletions

View File

@ -32,6 +32,7 @@ class ThemeManager:
def set_night_mode(self, val: bool) -> None: def set_night_mode(self, val: bool) -> None:
self._night_mode_preference = val self._night_mode_preference = val
self._update_stat_colors()
night_mode = property(get_night_mode, set_night_mode) night_mode = property(get_night_mode, set_night_mode)
@ -194,5 +195,13 @@ QTabWidget { background-color: %s; }
app.setPalette(palette) app.setPalette(palette)
def _update_stat_colors(self):
import anki.stats as s
s.colLearn = self.str_color("new-count")
s.colRelearn = self.str_color("learn-count")
s.colCram = self.str_color("suspended-bg")
s.colSusp = self.str_color("suspended-bg")
s.colMature = self.str_color("review-count")
theme_manager = ThemeManager() theme_manager = ThemeManager()

View File

@ -25,7 +25,7 @@ $night-frame-bg: #3a3a3a;
$night-border: #777; $night-border: #777;
$night-faint-border: #29292B; $night-faint-border: #29292B;
$night-link: #77ccff; $night-link: #77ccff;
$night-review-count: #7CFC00; $night-review-count: #5CcC00;
$night-new-count: #77ccff; $night-new-count: #77ccff;
$night-learn-count: #FF935B; $night-learn-count: #FF935B;
$night-zero-count: #777; $night-zero-count: #777;