diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index 042e28e2ae..f762a7caf6 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -112,6 +112,7 @@ DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* m_ptr = aSettings; m_settings = *aSettings; m_settings.SetupLayersList( m_layers, m_Parent, true ); + int layersWidth = m_layers->GetColumn( 0 )->GetWidth() + m_layers->GetColumn( 1 )->GetWidth(); m_settingsExported = false; @@ -120,7 +121,13 @@ DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* m_sdbSizerOK->SetDefault(); - FinishDialogSettings(); + GetSizer()->SetSizeHints( this ); + + // Must be done after SetSizeHints() else GTK will overwrite it + m_layers->SetMinSize( wxSize( layersWidth + 4, m_layers->GetMinSize().y ) ); + + // the default position, when calling the first time the dlg + Center(); } diff --git a/pcbnew/dialogs/dialog_copper_zones_base.cpp b/pcbnew/dialogs/dialog_copper_zones_base.cpp index 4e23b7a530..315bc02e09 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.cpp +++ b/pcbnew/dialogs/dialog_copper_zones_base.cpp @@ -249,7 +249,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i m_ExportSetupButton = new wxButton( this, wxID_BUTTON_EXPORT, _("Export Settings to Other Zones"), wxDefaultPosition, wxDefaultSize, 0 ); m_ExportSetupButton->SetToolTip( _("Export this zone setup (excluding layer and net selection) to all other copper zones.") ); - bSizerbottom->Add( m_ExportSetupButton, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 ); + bSizerbottom->Add( m_ExportSetupButton, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 10 ); m_sdbSizer = new wxStdDialogButtonSizer(); m_sdbSizerOK = new wxButton( this, wxID_OK ); diff --git a/pcbnew/dialogs/dialog_keepout_area_properties.cpp b/pcbnew/dialogs/dialog_keepout_area_properties.cpp index 4621dcc128..69e3236071 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties.cpp +++ b/pcbnew/dialogs/dialog_keepout_area_properties.cpp @@ -69,12 +69,18 @@ DIALOG_KEEPOUT_AREA_PROPERTIES::DIALOG_KEEPOUT_AREA_PROPERTIES( PCB_BASE_FRAME* m_ptr = aSettings; m_zonesettings = *aSettings; - m_zonesettings.SetupLayersList( m_layers, m_parent, true ); + int layersWidth = m_layers->GetColumn( 0 )->GetWidth() + m_layers->GetColumn( 1 )->GetWidth(); m_sdbSizerButtonsOK->SetDefault(); - FinishDialogSettings(); + GetSizer()->SetSizeHints( this ); + + // Must be done after SetSizeHints() else GTK will overwrite it + m_layers->SetMinSize( wxSize( layersWidth + 4, m_layers->GetMinSize().y ) ); + + // the default position, when calling the first time the dlg + Center(); } diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp b/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp index caff0b3a05..5d7fe3278b 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp @@ -72,10 +72,16 @@ DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR( PCB_BASE_FRAME* m_ptr = aSettings; m_settings = *aSettings; - m_settings.SetupLayersList( m_layers, m_parent, false ); + int layersWidth = m_layers->GetColumn( 0 )->GetWidth() + m_layers->GetColumn( 1 )->GetWidth(); - FinishDialogSettings(); + GetSizer()->SetSizeHints( this ); + + // Must be done after SetSizeHints() else GTK will overwrite it + m_layers->SetMinSize( wxSize( layersWidth + 4, m_layers->GetMinSize().y ) ); + + // the default position, when calling the first time the dlg + Center(); } diff --git a/pcbnew/zone_settings.cpp b/pcbnew/zone_settings.cpp index f731a64681..0deb046317 100644 --- a/pcbnew/zone_settings.cpp +++ b/pcbnew/zone_settings.cpp @@ -154,7 +154,7 @@ void ZONE_SETTINGS::SetCornerRadius( int aRadius ) #ifdef __WXOSX_MAC__ const static wxSize LAYER_BITMAP_SIZE( 28, 28 ); // wxCocoa impl unhappy if this isn't square... #else -const static wxSize LAYER_BITMAP_SIZE( 20, 10 ); +const static wxSize LAYER_BITMAP_SIZE( 24, 18 ); #endif // A helper for setting up a dialog list for specifying zone layers. Used by all three @@ -203,11 +203,6 @@ void ZONE_SETTINGS::SetupLayersList( wxDataViewListCtrl* aList, PCB_BASE_FRAME* // 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 ); - - wxSize minSize = wxSize( checkColumn->GetWidth() + layerColumn->GetWidth() + 4, - aList->GetMinSize().GetHeight() ); - aList->SetSize( minSize ); - aList->SetMinSize( minSize ); }