diff --git a/eeschema/dialogs/panel_eeschema_color_settings.cpp b/eeschema/dialogs/panel_eeschema_color_settings.cpp index e6da365046..0f86e1ec93 100644 --- a/eeschema/dialogs/panel_eeschema_color_settings.cpp +++ b/eeschema/dialogs/panel_eeschema_color_settings.cpp @@ -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 ) ); } diff --git a/pcbnew/dialogs/panel_pcbnew_color_settings.cpp b/pcbnew/dialogs/panel_pcbnew_color_settings.cpp index 9208304053..5a6daeb1f3 100644 --- a/pcbnew/dialogs/panel_pcbnew_color_settings.cpp +++ b/pcbnew/dialogs/panel_pcbnew_color_settings.cpp @@ -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 ) ); }