Differentiate search panel font between Mac and others.

Fixes https://gitlab.com/kicad/code/kicad/issues/13145
This commit is contained in:
Jeff Young 2022-12-13 00:35:08 +00:00
parent f24372bc18
commit d3228dbab2
6 changed files with 21 additions and 6 deletions

View File

@ -82,7 +82,7 @@ PROPERTIES_PANEL::PROPERTIES_PANEL( wxWindow* aParent, EDA_BASE_FRAME* aFrame )
m_grid->DedicateKey( WXK_NUMPAD_ENTER );
m_grid->DedicateKey( WXK_DOWN );
m_grid->DedicateKey( WXK_UP );
mainSizer->Add( m_grid, 1, wxALL | wxEXPAND, 5 );
mainSizer->Add( m_grid, 1, wxEXPAND, 5 );
m_grid->SetCellDisabledTextColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
@ -91,6 +91,8 @@ PROPERTIES_PANEL::PROPERTIES_PANEL( wxWindow* aParent, EDA_BASE_FRAME* aFrame )
m_grid->SetCaptionTextColour( wxSystemSettings::GetColour( wxSYS_COLOUR_CAPTIONTEXT ) );
#endif
SetFont( KIUI::GetDockedPaneFont( this ) );
SetSizer( mainSizer );
Layout();

View File

@ -20,11 +20,11 @@ SEARCH_PANE_BASE::SEARCH_PANE_BASE( wxWindow* parent, wxWindowID id, const wxPoi
m_searchCtrl1->ShowSearchButton( true );
#endif
m_searchCtrl1->ShowCancelButton( false );
m_sizerOuter->Add( m_searchCtrl1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_sizerOuter->Add( m_searchCtrl1, 0, wxEXPAND|wxTOP, 5 );
m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_sizerOuter->Add( m_notebook, 1, wxEXPAND, 5 );
m_sizerOuter->Add( m_notebook, 1, wxEXPAND|wxTOP, 5 );
this->SetSizer( m_sizerOuter );

View File

@ -61,7 +61,7 @@
<property name="permission">protected</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="flag">wxEXPAND|wxTOP</property>
<property name="proportion">0</property>
<object class="wxSearchCtrl" expanded="1">
<property name="BottomDockable">1</property>
@ -127,7 +127,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="flag">wxEXPAND|wxTOP</property>
<property name="proportion">1</property>
<object class="wxNotebook" expanded="1">
<property name="BottomDockable">1</property>

View File

@ -141,6 +141,18 @@ wxFont KIUI::GetStatusFont( wxWindow* aWindow )
}
wxFont KIUI::GetDockedPaneFont( wxWindow* aWindow )
{
#ifdef __WXMAC__
int scale = -1;
#else
int scale = 0;
#endif
return getGUIFont( aWindow, scale );
}
wxFont KIUI::GetInfoFont( wxWindow* aWindow )
{
return getGUIFont( aWindow, -1 );

View File

@ -61,6 +61,7 @@ wxFont GetMonospacedUIFont();
wxFont GetControlFont( wxWindow* aWindow );
wxFont GetInfoFont( wxWindow* aWindow );
wxFont GetDockedPaneFont( wxWindow* aWindow );
wxFont GetStatusFont( wxWindow* aWindow );
/**

View File

@ -36,7 +36,7 @@ PCB_SEARCH_PANE::PCB_SEARCH_PANE( PCB_EDIT_FRAME* aFrame ) :
m_pcbFrame->Connect( BOARD_CHANGED, wxCommandEventHandler( PCB_SEARCH_PANE::onBoardChanged ),
nullptr, this );
wxFont infoFont = KIUI::GetInfoFont( this );
wxFont infoFont = KIUI::GetDockedPaneFont( this );
SetFont( infoFont );
m_notebook->SetFont( infoFont );