I reviewed and tested the code on Windows and fixed below issues. Except below, it looks good to me.
Compilation error on windows
In configuration window, "maximumSize" of the control is provided along with "minimumSize" so it prevents control from expanding when the user resizes the window. Removed maxSize and set as default.
A Couple of points for discussion.
AFAIK - Users need to manually set the "AppsUseLightTheme" value in the registry, right ? Do we need to document that somewhere ?
As we have introduced 2 new "dark.qss" & "light.qss" files, so during packaging we need to make sure that it should reside along with "pgAdmin4" application binary otherwise those css will not be applied at runtime. right ?
Checkbox is not visible in Configure window UI as per below screenshot. Are you able to see on Mac ? If no, I can take a look at it.
The attached patch detects if dark mode is enabled on Windows (10+)/macOS (10.14+) at server start, and styles the runtime accordingly. It doesn't dynamically switch if the user changes their preferences.
Linux builds continue to use the standard styling from Qt.
NOTE: I've tested this on macOS, but my Windows build system is playing up at the moment. Akshay, can you have someone on your team test it please? I believe the code should work; it's just a case of reading a reg key and then doing the same thing as on macOS to set the theme accordingly.