Slight improvement to overly-wide checkbox columns.

This commit is contained in:
Jeff Young 2022-11-14 18:46:39 +00:00
parent e85a84b8a3
commit bc0a753238
3 changed files with 15 additions and 13 deletions

View File

@ -1337,8 +1337,10 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnSizeFieldList( wxSizeEvent& event )
int nameColWidth = KIPLATFORM::UI::GetUnobscuredSize( m_fieldsCtrl ).x;
nameColWidth -= m_showColWidth + m_groupByColWidth;
#ifdef __WXMAC__
// TODO: something in wxWidgets 3.1.x makes checkboxes really wide...
nameColWidth -= 40;
// TODO: something in wxWidgets 3.1.x pads checkbox columns with extra space. (It used to
// also be that the width of the column would get set too wide (to 30), but that's patched in
// our local wxWidgets fork.)
nameColWidth -= 30;
#endif
// GTK loses its head and messes these up when resizing the splitter bar:

View File

@ -120,13 +120,13 @@ DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aParent ) :
int layerColSize = textWidth + 15;
#ifdef __WXMAC__
// TODO: something in wxWidgets 3.1.x makes checkbox padding really large...
int checkColMargins = 40;
#else
int checkColMargins = 0;
// TODO: something in wxWidgets 3.1.x pads checkbox columns with extra space. (It used to
// also be that the width of the column would get set too wide (to 30), but that's patched in
// our local wxWidgets fork.)
checkColSize += 30;
#endif
m_layerCheckListBox->SetMinClientSize( wxSize( checkColSize + checkColMargins + layerColSize,
m_layerCheckListBox->SetMinClientSize( wxSize( checkColSize + layerColSize,
m_layerCheckListBox->GetMinClientSize().y ) );
wxStaticBox* allLayersLabel = new wxStaticBox( this, wxID_ANY, _( "Plot on All Layers" ) );
@ -136,7 +136,7 @@ DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aParent ) :
wxDefaultPosition, wxDefaultSize,
plotAllLayersOrder, plotAllLayersChoicesStrings, 0 );
m_plotAllLayersList->SetMinClientSize( wxSize( checkColSize + checkColMargins + layerColSize,
m_plotAllLayersList->SetMinClientSize( wxSize( checkColSize + layerColSize,
m_plotAllLayersList->GetMinClientSize().y ) );
// Attach the LAYER_ID to each item in m_plotAllLayersList

View File

@ -246,16 +246,16 @@ void ZONE_SETTINGS::SetupLayersList( wxDataViewListCtrl* aList, PCB_BASE_FRAME*
int layerColSize = textWidth + LAYER_BITMAP_SIZE.x + 15;
#ifdef __WXMAC__
// TODO: something in wxWidgets 3.1.x makes checkbox padding really large...
int checkColMargins = 40;
#else
int checkColMargins = 0;
// TODO: something in wxWidgets 3.1.x pads checkbox columns with extra space. (It used to
// also be that the width of the column would get set too wide (to 30), but that's patched in
// our local wxWidgets fork.)
checkColSize += 30;
#endif
// You'd think the fact that m_layers is a list would encourage wxWidgets not to save room
// for the tree expanders... but you'd be wrong. Force indent to 0.
aList->SetIndent( 0 );
aList->SetMinClientSize( wxSize( checkColSize + checkColMargins + layerColSize,
aList->SetMinClientSize( wxSize( checkColSize + layerColSize,
aList->GetMinClientSize().y ) );
checkColumn->SetWidth( checkColSize );