From 77421c8fb6ed87897bc870478d9206deabf64d43 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 13 Feb 2023 10:13:08 +0000 Subject: [PATCH] Fix too-narrow text edit control on Mac. Also makes the yellow error highlight in CvPCB a bit less jarring. Fixes https://gitlab.com/kicad/code/kicad/issues/13866 --- cvpcb/symbols_listbox.cpp | 5 ++--- cvpcb/toolbars_cvpcb.cpp | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cvpcb/symbols_listbox.cpp b/cvpcb/symbols_listbox.cpp index 57b4f7bb03..ba4f612e9b 100644 --- a/cvpcb/symbols_listbox.cpp +++ b/cvpcb/symbols_listbox.cpp @@ -38,9 +38,8 @@ SYMBOLS_LISTBOX::SYMBOLS_LISTBOX( CVPCB_MAINFRAME* parent, wxWindowID id ) : ITEMS_LISTBOX_BASE( parent, id ), m_warningAttr( std::make_unique() ) { - m_warningAttr->SetBackgroundColour( KIPLATFORM::UI::IsDarkTheme() - ? wxColour( 112, 96, 32 ) - : *wxYELLOW ); + m_warningAttr->SetBackgroundColour( KIPLATFORM::UI::IsDarkTheme() ? wxColour( 112, 96, 32 ) + : wxColour( 255, 248, 212 ) ); } diff --git a/cvpcb/toolbars_cvpcb.cpp b/cvpcb/toolbars_cvpcb.cpp index c486244625..22fcf5cc90 100644 --- a/cvpcb/toolbars_cvpcb.cpp +++ b/cvpcb/toolbars_cvpcb.cpp @@ -84,6 +84,9 @@ void CVPCB_MAINFRAME::ReCreateHToolbar() m_tcFilterString = new wxTextCtrl( m_mainToolBar, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); + // Min size on Mac is (a not very useful) single character + m_tcFilterString->SetMinSize( wxSize( 150, -1 ) ); + m_tcFilterString->Bind( wxEVT_TEXT_ENTER, &CVPCB_MAINFRAME::onTextFilterChanged, this ); m_mainToolBar->AddControl( m_tcFilterString );