Probably before the first window is constructed, though. From a quick search, the Windows registry has a key AppsUseLightTheme in HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize that is set to 0 if Dark mode is enabled. This could be queried during start-up and the settings value adjusted accordingly.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It would appear that activating Dark mode using the default Adwaita theme is as simple as modifying the default Gtk settings when starting up.
Probably before the first window is constructed, though. From a quick search, the Windows registry has a key
AppsUseLightThemeinHKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalizethat is set to 0 if Dark mode is enabled. This could be queried during start-up and the settings value adjusted accordingly.I've committed changes to automatically activate the dark theme on Windows when it is set as default in Windows theme settings.
Thank you!