Seth Hillbrand 1 month ago
parent
commit
e346139301
  1. 6
      common/widgets/color_swatch.cpp
  2. 2
      pcb_calculator/calculator_panels/panel_eseries_display.cpp

6
common/widgets/color_swatch.cpp

@ -326,7 +326,9 @@ void COLOR_SWATCH::GetNewSwatchColor()
void COLOR_SWATCH::OnDarkModeToggle()
{
m_checkerboardBg = m_parent->GetBackgroundColour();
wxWindow* parent = GetParent();
m_checkerboardBg = parent ? parent->GetBackgroundColour() : wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW );
m_swatch->SetBitmap( makeBitmap() );
if( m_swatch )
m_swatch->SetBitmap( makeBitmap() );
}

2
pcb_calculator/calculator_panels/panel_eseries_display.cpp

@ -70,7 +70,7 @@ PANEL_ESERIES_DISPLAY::PANEL_ESERIES_DISPLAY( wxWindow * parent, wxWindowID id,
// making the value boxes appear to be separated from each other.
// Also force text to always be black so it is visible against the light
// colored cells in both light and dark modes.
wxColour gridLineColour = parent->GetBackgroundColour();
wxColour gridLineColour = parent ? parent->GetBackgroundColour() : wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW );
m_GridEseries112->SetDefaultCellTextColour( *wxBLACK );
m_GridEseries112->SetGridLineColour( gridLineColour );

Loading…
Cancel
Save