Add support mode for dark mode to SCINTILLA_TRICKS.

Also removes the return value from the BITMAP_STORE's themeChanged
method as it will provide the wrong answer for the second frame it's
called on.

Also hooked up ACTION_TOOLBAR, the app launcher, and the project tree
to the wx event for system color changes so they change on the fly.

Fixes https://gitlab.com/kicad/code/kicad/issues/6026
This commit is contained in:
Jeff Young
2021-09-14 00:18:50 +01:00
parent ab46aba5c9
commit 7a993c0211
14 changed files with 153 additions and 50 deletions
+4 -6
View File
@@ -164,11 +164,10 @@ wxImage BITMAP_STORE::getImage( BITMAPS aBitmapId, int aHeight )
}
bool BITMAP_STORE::ThemeChanged()
void BITMAP_STORE::ThemeChanged()
{
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
wxString oldTheme = m_theme;
wxString oldTheme = m_theme;
if( settings )
{
@@ -186,9 +185,8 @@ bool BITMAP_STORE::ThemeChanged()
m_theme = wxT( "light" );
}
m_bitmapNameCache.clear();
return !oldTheme.IsSameAs( m_theme );
if( !oldTheme.IsSameAs( m_theme ) )
m_bitmapNameCache.clear();
}