From e97bdeda473452e8dced638ea5251b6b592c9087 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sat, 17 Dec 2022 13:51:17 -0500 Subject: [PATCH] Detect dark mode in symbol problem highlight in cvpcb Fixes https://gitlab.com/kicad/code/kicad/-/issues/13068 --- cvpcb/symbols_listbox.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cvpcb/symbols_listbox.cpp b/cvpcb/symbols_listbox.cpp index 4bd8f101ae..9726510f59 100644 --- a/cvpcb/symbols_listbox.cpp +++ b/cvpcb/symbols_listbox.cpp @@ -27,6 +27,7 @@ #include +#include #include #include #include @@ -37,14 +38,16 @@ SYMBOLS_LISTBOX::SYMBOLS_LISTBOX( CVPCB_MAINFRAME* parent, wxWindowID id ) : ITEMS_LISTBOX_BASE( parent, id ), m_warningAttr( std::make_unique() ) { - m_warningAttr->SetBackgroundColour( *wxYELLOW ); + m_warningAttr->SetBackgroundColour( KIPLATFORM::UI::IsDarkTheme() + ? wxColour( 112, 96, 32 ) + : *wxYELLOW ); } SYMBOLS_LISTBOX::~SYMBOLS_LISTBOX() { } - +; BEGIN_EVENT_TABLE( SYMBOLS_LISTBOX, ITEMS_LISTBOX_BASE ) EVT_CHAR( SYMBOLS_LISTBOX::OnChar )