Commit Graph

27 Commits

Author SHA1 Message Date
Damien Elmes
234e03d44d fix invisible scrollbar in nightmode
vars.scss no longer contains the Qt theme definitions, so the
easiest solution was to duplicate the colour in this case
2020-10-06 14:35:21 +10:00
Damien Elmes
748745fe1a drop the old sass vars and define the properties directly 2020-09-01 10:24:38 +10:00
Damien Elmes
2d26280dab migrate the majority of the sass vars to css variables
Allows add-ons to easily override the theme, and allows us to apply
styling to elements outside of the normal document flow (like applying
the normal background colour to a position: fixed element).
2020-09-01 10:24:38 +10:00
Damien Elmes
06a0b1ee73 pass night mode into body_class() instead of changing globally 2020-07-31 14:47:17 +10:00
Damien Elmes
65cfcf9226 pare back dark mode support
Anki now solely relies on the night mode setting in the preferences
to decide whether to show in light or dark mode. Some users wanted
to run Anki in light mode while keeping the rest of their system dark,
and there were various display problems when dark mode was changed
after Anki started that couldn't be easily worked around.

NSRequiresAquaAppearance is set again, which means we can rely on
the interface appearing properly and not changing as the macOS theme
is changed.

Users who only use dark mode, and preferred the native look of widgets
in dark mode, can achieve the previous appearance by running the
following command in the terminal:

defaults write net.ankiweb.dtop NSRequiresAquaSystemAppearance -bool no

And the following in the debug console:

mw.pm.meta["dark_mode_widgets"] = True

This is hidden behind a debug console command because it requires the
user ensure their system is always set to the same light/dark mode
as Anki.
2020-04-15 21:44:56 +10:00
Damien Elmes
7d94465256 cache dark mode value so UI doesn't break when it changes
https://anki.tenderapp.com/discussions/ankidesktop/39550-cant-deactivate-night-mode-on-2121-for-mac
2020-03-23 18:39:37 +10:00
Alan Du
96ca469d12 Monkeytype qt/aqt/theme.py 2020-03-01 10:16:08 -05:00
Damien Elmes
a634188ec5 fix dark mode target Qt version 2020-02-26 16:53:35 +10:00
Damien Elmes
06dee0ef08 formatting fix 2020-02-25 17:29:10 +10:00
Damien Elmes
0fae85d2b4 don't pick up system dark theme in -alternate Mac build
The older Qt doesn't support it properly
2020-02-25 15:46:39 +10:00
Damien Elmes
c8b794e6cc formatting 2020-02-07 17:55:26 +10:00
Damien Elmes
5b01f0dad1 more legible graph colours in night mode 2020-02-07 13:21:46 +10:00
Damien Elmes
ab1f2429a7 formatting 2020-02-02 13:09:02 +10:00
Damien Elmes
91326ec6d9 only apply padding fix to stats screen
It was breaking the display of dialogs like the filtered deck screen
2020-02-02 13:07:24 +10:00
Damien Elmes
3c48cbff6f more contrast on buttons and scrollbars 2020-02-02 12:53:35 +10:00
Damien Elmes
dd9812c7ed match fusion bars to webview bars, bump size again 2020-02-02 12:25:07 +10:00
Damien Elmes
05be20f834 make pylint happy 2020-01-31 14:30:41 +10:00
Damien Elmes
c70badcd5a only import darkdetect on a Mac 2020-01-31 14:14:54 +10:00
Damien Elmes
8b68512e0e when dark mode not active, match fusion buttons 2020-01-31 13:39:52 +10:00
Damien Elmes
70d085f475 ignore dark mode when running from source, as it doesn't work 2020-01-31 13:30:35 +10:00
Damien Elmes
598ffbd340 maintain separate icon cache for light and dark themes 2020-01-31 13:30:12 +10:00
Damien Elmes
c42e118339 use night mode when dark mode active, using standard macOS theme 2020-01-31 13:15:08 +10:00
Damien Elmes
2d5cab6758 add .night_mode as well
Please report if this causes any regressions.
2020-01-31 07:00:01 +10:00
Damien Elmes
e2e7128385 fix tags area and stats buttons in night mode 2020-01-26 09:13:38 +10:00
Damien Elmes
e3fb184a84 fix night mode tooltips 2020-01-24 07:55:14 +10:00
Damien Elmes
4a25853c57 fix inconsistently sized buttons and add platform classes 2020-01-23 18:05:55 +10:00
Damien Elmes
7dcbc7efec basic night mode support
Forces the Fusion theme when running night mode, so we don't need
to work around platform themes that don't respond to the defined
palette.

Feedback/suggestions on the chosen colours welcome - _vars.scss is the
file to change if you want to experiment with adjustments.
2020-01-23 17:27:07 +10:00