diff --git a/common/dialogs/panel_common_settings_base.cpp b/common/dialogs/panel_common_settings_base.cpp index 076d7b5c5c..be153ef137 100644 --- a/common/dialogs/panel_common_settings_base.cpp +++ b/common/dialogs/panel_common_settings_base.cpp @@ -78,7 +78,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind int m_antialiasingNChoices = sizeof( m_antialiasingChoices ) / sizeof( wxString ); m_antialiasing = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_antialiasingNChoices, m_antialiasingChoices, 0 ); m_antialiasing->SetSelection( 0 ); - gbSizer1->Add( m_antialiasing, wxGBPosition( 4, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + gbSizer1->Add( m_antialiasing, wxGBPosition( 4, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); m_antialiasingFallbackLabel = new wxStaticText( this, wxID_ANY, _("Fallback graphics:"), wxDefaultPosition, wxDefaultSize, 0 ); m_antialiasingFallbackLabel->Wrap( -1 ); @@ -88,7 +88,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind int m_antialiasingFallbackNChoices = sizeof( m_antialiasingFallbackChoices ) / sizeof( wxString ); m_antialiasingFallback = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_antialiasingFallbackNChoices, m_antialiasingFallbackChoices, 0 ); m_antialiasingFallback->SetSelection( 0 ); - gbSizer1->Add( m_antialiasingFallback, wxGBPosition( 6, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + gbSizer1->Add( m_antialiasingFallback, wxGBPosition( 6, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); gbSizer1->AddGrowableCol( 1 ); diff --git a/common/dialogs/panel_common_settings_base.fbp b/common/dialogs/panel_common_settings_base.fbp index 544efd0397..a2ec18269c 100644 --- a/common/dialogs/panel_common_settings_base.fbp +++ b/common/dialogs/panel_common_settings_base.fbp @@ -677,7 +677,7 @@ 5 2 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT 4 1 @@ -808,7 +808,7 @@ 5 2 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT 6 1 diff --git a/pcbnew/dialogs/panel_fp_editor_defaults_base.cpp b/pcbnew/dialogs/panel_fp_editor_defaults_base.cpp index e32aba34b6..e8a9601f46 100644 --- a/pcbnew/dialogs/panel_fp_editor_defaults_base.cpp +++ b/pcbnew/dialogs/panel_fp_editor_defaults_base.cpp @@ -23,10 +23,10 @@ PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent, defaultTextItemsLabel->Wrap( -1 ); bSizerMargins->Add( defaultTextItemsLabel, 0, wxTOP|wxLEFT, 5 ); - wxStaticBoxSizer* sbSizerTexts; - sbSizerTexts = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); + wxBoxSizer* defaultTextItemsSizer; + defaultTextItemsSizer = new wxBoxSizer( wxVERTICAL ); - m_textItemsGrid = new WX_GRID( sbSizerTexts->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_textItemsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0 ); // Grid m_textItemsGrid->CreateGrid( 2, 3 ); @@ -60,12 +60,12 @@ PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent, m_textItemsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); m_textItemsGrid->SetMinSize( wxSize( -1,140 ) ); - sbSizerTexts->Add( m_textItemsGrid, 1, wxALL|wxBOTTOM|wxEXPAND, 5 ); + defaultTextItemsSizer->Add( m_textItemsGrid, 1, wxALL|wxBOTTOM|wxEXPAND, 5 ); wxBoxSizer* bButtonSize; bButtonSize = new wxBoxSizer( wxHORIZONTAL ); - m_bpAdd = new wxBitmapButton( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpAdd = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpAdd->SetMinSize( wxSize( 30,29 ) ); bButtonSize->Add( m_bpAdd, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); @@ -73,22 +73,25 @@ PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent, bButtonSize->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_bpDelete = new wxBitmapButton( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpDelete = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpDelete->SetMinSize( wxSize( 30,29 ) ); bButtonSize->Add( m_bpDelete, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); - sbSizerTexts->Add( bButtonSize, 0, wxEXPAND, 5 ); - - - bSizerMargins->Add( sbSizerTexts, 1, wxEXPAND|wxLEFT, 20 ); + bButtonSize->Add( 0, 0, 1, wxEXPAND, 5 ); m_staticTextInfo = new wxStaticText( this, wxID_ANY, _("Note: a blank reference designator or value will use the footprint name."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextInfo->Wrap( -1 ); m_staticTextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - bSizerMargins->Add( m_staticTextInfo, 0, wxBOTTOM|wxLEFT, 25 ); + bButtonSize->Add( m_staticTextInfo, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + + defaultTextItemsSizer->Add( bButtonSize, 0, wxEXPAND, 5 ); + + + bSizerMargins->Add( defaultTextItemsSizer, 1, wxEXPAND|wxLEFT, 20 ); bSizerMargins->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 ); diff --git a/pcbnew/dialogs/panel_fp_editor_defaults_base.fbp b/pcbnew/dialogs/panel_fp_editor_defaults_base.fbp index 1033e79a6e..61b293212c 100644 --- a/pcbnew/dialogs/panel_fp_editor_defaults_base.fbp +++ b/pcbnew/dialogs/panel_fp_editor_defaults_base.fbp @@ -128,13 +128,10 @@ 20 wxEXPAND|wxLEFT 1 - - wxID_ANY - + - sbSizerTexts + defaultTextItemsSizer wxVERTICAL - 1 none 5 @@ -390,71 +387,81 @@ OnDeleteTextItem + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,-1,70,0 + 0 + 0 + wxID_ANY + Note: a blank reference designator or value will use the footprint name. + 0 + + 0 + + + 0 + + 1 + m_staticTextInfo + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + - - 25 - wxBOTTOM|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - ,90,90,-1,70,0 - 0 - 0 - wxID_ANY - Note: a blank reference designator or value will use the footprint name. - 0 - - 0 - - - 0 - - 1 - m_staticTextInfo - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - 10 wxEXPAND|wxTOP|wxBOTTOM diff --git a/pcbnew/dialogs/panel_fp_editor_defaults_base.h b/pcbnew/dialogs/panel_fp_editor_defaults_base.h index d4c601a102..b51f491f6c 100644 --- a/pcbnew/dialogs/panel_fp_editor_defaults_base.h +++ b/pcbnew/dialogs/panel_fp_editor_defaults_base.h @@ -25,7 +25,6 @@ class WX_GRID; #include #include #include -#include #include ///////////////////////////////////////////////////////////////////////////