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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user