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
This commit is contained in:
Jeff Young 2023-02-13 10:13:08 +00:00
parent 17059971e8
commit 77421c8fb6
2 changed files with 5 additions and 3 deletions

View File

@ -38,9 +38,8 @@ SYMBOLS_LISTBOX::SYMBOLS_LISTBOX( CVPCB_MAINFRAME* parent, wxWindowID id ) :
ITEMS_LISTBOX_BASE( parent, id ),
m_warningAttr( std::make_unique<wxListItemAttr>() )
{
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 ) );
}

View File

@ -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 );