Enable icon themes for Windows
Windows 10 "dark mode" is not supported and likely won't be, but high-contrast mode and manual color theme editing is still possible.
This commit is contained in:
parent
cb451dc4b2
commit
a9f86c6f3d
|
@ -345,7 +345,7 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
|||
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::DrawBoundingBoxes,
|
||||
&m_DrawBoundingBoxes, false ) );
|
||||
|
||||
#ifdef __WXGTK__
|
||||
#if defined( __WXGTK__ ) || defined( __WXMSW__ )
|
||||
bool defaultDarkMode = true;
|
||||
#else
|
||||
bool defaultDarkMode = false;
|
||||
|
|
|
@ -53,7 +53,14 @@ bool KIPLATFORM::UI::IsDarkTheme()
|
|||
|
||||
return ( val == 0 );
|
||||
#else
|
||||
return false;
|
||||
wxColour bg = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW );
|
||||
|
||||
// Weighted W3C formula
|
||||
double brightness = ( bg.Red() / 255.0 ) * 0.299 +
|
||||
( bg.Green() / 255.0 ) * 0.587 +
|
||||
( bg.Blue() / 255.0 ) * 0.117;
|
||||
|
||||
return brightness < 0.5;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue