From 74316a62d3869520b376f8aab5fb087756cf862c Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Mon, 19 Feb 2024 20:46:36 +0000 Subject: [PATCH] Always use black text in PCB calculator E-series table The white text in dark mode is too washed out on the cell colors to be visible. Since we already purposely subdue the colors in dark mode, the easiest fix is to just always use black text. Fixes https://gitlab.com/kicad/code/kicad/-/issues/17033 (cherry picked from commit c7d280dfa1ae0d28b73fba83511c52d55e0c3238) --- pcb_calculator/calculator_panels/panel_eseries_display.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcb_calculator/calculator_panels/panel_eseries_display.cpp b/pcb_calculator/calculator_panels/panel_eseries_display.cpp index 6575dac2f1..44cfc6a81a 100644 --- a/pcb_calculator/calculator_panels/panel_eseries_display.cpp +++ b/pcb_calculator/calculator_panels/panel_eseries_display.cpp @@ -68,14 +68,18 @@ PANEL_ESERIES_DISPLAY::PANEL_ESERIES_DISPLAY( wxWindow * parent, wxWindowID id, // Make the grid lines disappear into the window background // 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(); + m_GridEseries112->SetDefaultCellTextColour( *wxBLACK ); m_GridEseries112->SetGridLineColour( gridLineColour ); m_GridEseries112->EnableGridLines( true ); m_GridEseries112->SetColLabelSize( wxGRID_AUTOSIZE ); m_GridEseries112->AutoSize(); + m_GridEseries2496->SetDefaultCellTextColour( *wxBLACK ); m_GridEseries2496->SetGridLineColour( gridLineColour ); m_GridEseries2496->EnableGridLines( true );