Implement fundamentals of clever dark mode #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #45
TODO
When we know to read that setting, we can temporarily disable the override (which is a little ugly hack as it can cause design distortions? Or is the new design always correct?) – that is what I have implemented currently –, but of course obvious reasons an interactive listener/trigger/reaction upon such a change cannot be implemented.
Unless (and this may need investigation), such a listener uses the setting when it has been registered. If that would work, we'd only need to register the listener for
browser
orsystem
mode (maybe user-selectable) once, and can still trigger the change. Still complex though…An alternative would be a simple polling algorithm, but that is also ugly, especially as it would need to temporarily remove the override (see above), so that would likely definitively lead to visual gliches.
So maybe this is not possible at all, and it's not useful to pursue this idea anymore…
resources