Closed AttemptToCallNil closed 3 years ago
Here is what I'm thinking
https://github.com/justjavac/is-dark-theme
Use this package to auto detect (hopefully it works cross platform), then save the variable. Any future changes to OS shouldn't matter, as the initial launch has happen and we are using a variable inside the application to control light/dark.
Hm, yeah, that might work
Currently using light or dark mode is determined once, when MAGE starts up. It's also hard-bound to the light/dark setting of the OS. I'm not sure this is even possible, but if it is, a more advanced approach might have some advantages. Defaulting to the OS mode with the ability to switch modes at runtime will let people specifically use a mode not configured for their OS (in case they have MAGE-specific mode preferences), but (arguably, more importantly) this could seriously simplify light/dark mode testing for developers. Right now I'd have to close MAGE and re-run
pnpm run electron:serve
whenever I want to test MAGE with a different mode.