eeschema, pcbnew: fix too narrow window showing the item color list

Fixes #4610
https://gitlab.com/kicad/code/kicad/issues/4610
This commit is contained in:
jean-pierre charras 2020-06-09 18:36:26 +02:00
parent 3091bb1459
commit 2401ed587e
2 changed files with 12 additions and 0 deletions

View File

@ -195,6 +195,12 @@ void PANEL_EESCHEMA_COLOR_SETTINGS::createSwatches()
for( int layer : layers )
createSwatch( layer, LayerName( layer ) );
// Give a minimal width to m_colorsListWindow, in order to always having
// a full row shown
int min_width = m_colorsGridSizer->GetMinSize().x;
const int margin = 20; // A margin around the sizer
m_colorsListWindow->SetMinSize( wxSize( min_width + margin, -1 ) );
}

View File

@ -145,4 +145,10 @@ void PANEL_PCBNEW_COLOR_SETTINGS::createSwatches()
createSwatch( layer, name );
}
// Give a minimal width to m_colorsListWindow, in order to always having
// a full row shown
int min_width = m_colorsGridSizer->GetMinSize().x;
const int margin = 20; // A margin around the sizer
m_colorsListWindow->SetMinSize( wxSize( min_width + margin, -1 ) );
}