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:
parent
17059971e8
commit
77421c8fb6
|
@ -38,9 +38,8 @@ SYMBOLS_LISTBOX::SYMBOLS_LISTBOX( CVPCB_MAINFRAME* parent, wxWindowID id ) :
|
||||||
ITEMS_LISTBOX_BASE( parent, id ),
|
ITEMS_LISTBOX_BASE( parent, id ),
|
||||||
m_warningAttr( std::make_unique<wxListItemAttr>() )
|
m_warningAttr( std::make_unique<wxListItemAttr>() )
|
||||||
{
|
{
|
||||||
m_warningAttr->SetBackgroundColour( KIPLATFORM::UI::IsDarkTheme()
|
m_warningAttr->SetBackgroundColour( KIPLATFORM::UI::IsDarkTheme() ? wxColour( 112, 96, 32 )
|
||||||
? wxColour( 112, 96, 32 )
|
: wxColour( 255, 248, 212 ) );
|
||||||
: *wxYELLOW );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,9 @@ void CVPCB_MAINFRAME::ReCreateHToolbar()
|
||||||
m_tcFilterString = new wxTextCtrl( m_mainToolBar, wxID_ANY, wxEmptyString, wxDefaultPosition,
|
m_tcFilterString = new wxTextCtrl( m_mainToolBar, wxID_ANY, wxEmptyString, wxDefaultPosition,
|
||||||
wxDefaultSize, wxTE_PROCESS_ENTER );
|
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_tcFilterString->Bind( wxEVT_TEXT_ENTER, &CVPCB_MAINFRAME::onTextFilterChanged, this );
|
||||||
|
|
||||||
m_mainToolBar->AddControl( m_tcFilterString );
|
m_mainToolBar->AddControl( m_tcFilterString );
|
||||||
|
|
Loading…
Reference in New Issue