Symbol Fields Table: Make list look as good as possible on Windows too
This commit is contained in:
parent
933b82495d
commit
b0cca4a89e
|
@ -1170,8 +1170,14 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnTableItemContextMenu( wxGridEvent& event )
|
|||
|
||||
void DIALOG_SYMBOL_FIELDS_TABLE::OnSizeFieldList( wxSizeEvent& event )
|
||||
{
|
||||
// GetClientSize subtracts scrollbars width on Windows.
|
||||
// On other platforms, the visible area must be computed manually.
|
||||
#ifdef __WINDOWS__
|
||||
int nameColWidth = m_fieldsCtrl->GetClientSize().x - m_showColWidth - m_groupByColWidth;
|
||||
#else
|
||||
int nameColWidth = event.GetSize().GetX() - m_showColWidth - m_groupByColWidth
|
||||
- wxSystemSettings::GetMetric( wxSYS_VSCROLL_X );
|
||||
- wxSystemSettings::GetMetric( wxSYS_VSCROLL_X );
|
||||
#endif
|
||||
|
||||
// GTK loses its head and messes these up when resizing the splitter bar:
|
||||
m_fieldsCtrl->GetColumn( SHOW_FIELD_COLUMN )->SetWidth( m_showColWidth );
|
||||
|
@ -1180,6 +1186,8 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnSizeFieldList( wxSizeEvent& event )
|
|||
m_fieldsCtrl->GetColumn( CANONICAL_NAME_COLUMN )->SetHidden( true );
|
||||
m_fieldsCtrl->GetColumn( DISPLAY_NAME_COLUMN )->SetWidth( nameColWidth );
|
||||
|
||||
m_fieldsCtrl->Refresh(); // To refresh checkboxes on Windows.
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue