Improve dark mode detection in wxMSW
Use the registry key corresponding to the selection of "Light" or "Dark" for the "Colors" in the "Settings" applet, see https://stackoverflow.com/questions/51334674/how-to-detect-windows-10-light-dark-mode-in-win32-application/ Closes #22020.
This commit is contained in:
@@ -75,12 +75,17 @@ wxString wxSystemAppearance::GetName() const
|
||||
return wxString();
|
||||
}
|
||||
|
||||
#endif // !__WXOSX__
|
||||
|
||||
// These ports implement this function using platform-specific API.
|
||||
#if !defined(__WXOSX__) && !defined(__WXMSW__)
|
||||
|
||||
bool wxSystemAppearance::IsDark() const
|
||||
{
|
||||
return IsUsingDarkBackground();
|
||||
}
|
||||
|
||||
#endif // !__WXOSX__
|
||||
#endif // !__WXOSX__ && !__WXMSW__
|
||||
|
||||
bool wxSystemAppearance::IsUsingDarkBackground() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user