diff --git a/eeschema/dialog_libedit_dimensions.cpp b/eeschema/dialog_libedit_dimensions.cpp
index b8a3be8e04..b87808bf6f 100644
--- a/eeschema/dialog_libedit_dimensions.cpp
+++ b/eeschema/dialog_libedit_dimensions.cpp
@@ -21,6 +21,8 @@ class DIALOG_LIBEDIT_DIMENSIONS : public DIALOG_LIBEDIT_DIMENSIONS_BASE
public:
DIALOG_LIBEDIT_DIMENSIONS( WinEDA_LibeditFrame* parent);
~DIALOG_LIBEDIT_DIMENSIONS();
+ private:
+ void initDialog( );
};
@@ -33,10 +35,16 @@ void WinEDA_LibeditFrame::InstallDimensionsDialog( wxCommandEvent& event )
DIALOG_LIBEDIT_DIMENSIONS::DIALOG_LIBEDIT_DIMENSIONS( WinEDA_LibeditFrame* parent )
: DIALOG_LIBEDIT_DIMENSIONS_BASE( parent )
{
- this->Centre( wxBOTH );
+ GetSizer()->SetSizeHints(this);
+ Centre( wxBOTH );
}
DIALOG_LIBEDIT_DIMENSIONS::~DIALOG_LIBEDIT_DIMENSIONS()
{
}
+void DIALOG_LIBEDIT_DIMENSIONS::initDialog()
+{
+ SetFocus( );
+}
+
diff --git a/eeschema/dialog_libedit_dimensions_base.cpp b/eeschema/dialog_libedit_dimensions_base.cpp
index 6bd0a19701..2027277843 100644
--- a/eeschema/dialog_libedit_dimensions_base.cpp
+++ b/eeschema/dialog_libedit_dimensions_base.cpp
@@ -9,15 +9,18 @@
///////////////////////////////////////////////////////////////////////////
+BEGIN_EVENT_TABLE( DIALOG_LIBEDIT_DIMENSIONS_BASE, wxDialog )
+ EVT_BUTTON( wxID_ANY, DIALOG_LIBEDIT_DIMENSIONS_BASE::_wxFB_OnSaveSetupClick )
+ EVT_BUTTON( wxID_CANCEL, DIALOG_LIBEDIT_DIMENSIONS_BASE::_wxFB_OnCancelClick )
+ EVT_BUTTON( wxID_OK, DIALOG_LIBEDIT_DIMENSIONS_BASE::_wxFB_OnOkClick )
+END_EVENT_TABLE()
+
DIALOG_LIBEDIT_DIMENSIONS_BASE::DIALOG_LIBEDIT_DIMENSIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* mainSizer;
- mainSizer = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizerMain;
- bSizerMain = new wxBoxSizer( wxVERTICAL );
+ mainSizer = new wxBoxSizer( wxVERTICAL );
wxFlexGridSizer* fgSizer1;
fgSizer1 = new wxFlexGridSizer( 7, 3, 0, 0 );
@@ -31,7 +34,7 @@ DIALOG_LIBEDIT_DIMENSIONS_BASE::DIALOG_LIBEDIT_DIMENSIONS_BASE( wxWindow* parent
m_staticText3->Wrap( -1 );
fgSizer1->Add( m_staticText3, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
- wxString m_choiceGridSizeChoices[] = { _("100"), _("50"), _("25"), _("10"), _("5"), _("2"), _("1") };
+ wxString m_choiceGridSizeChoices[] = { _("50"), _("25"), _("10"), _("5"), _("2"), _("1") };
int m_choiceGridSizeNChoices = sizeof( m_choiceGridSizeChoices ) / sizeof( wxString );
m_choiceGridSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceGridSizeNChoices, m_choiceGridSizeChoices, 0 );
m_choiceGridSize->SetSelection( 0 );
@@ -67,7 +70,7 @@ DIALOG_LIBEDIT_DIMENSIONS_BASE::DIALOG_LIBEDIT_DIMENSIONS_BASE( wxWindow* parent
m_staticText9->Wrap( -1 );
fgSizer1->Add( m_staticText9, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
- wxString m_choiceRepeatHorizontalChoices[] = { _("100"), _("50") };
+ wxString m_choiceRepeatHorizontalChoices[] = { _("50"), _("25") };
int m_choiceRepeatHorizontalNChoices = sizeof( m_choiceRepeatHorizontalChoices ) / sizeof( wxString );
m_choiceRepeatHorizontal = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceRepeatHorizontalNChoices, m_choiceRepeatHorizontalChoices, 0 );
m_choiceRepeatHorizontal->SetSelection( 0 );
@@ -81,7 +84,7 @@ DIALOG_LIBEDIT_DIMENSIONS_BASE::DIALOG_LIBEDIT_DIMENSIONS_BASE( wxWindow* parent
m_staticText12->Wrap( -1 );
fgSizer1->Add( m_staticText12, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
- wxString m_choiceRepeatVerticalChoices[] = { _("100"), _("50") };
+ wxString m_choiceRepeatVerticalChoices[] = { _("50"), _("25") };
int m_choiceRepeatVerticalNChoices = sizeof( m_choiceRepeatVerticalChoices ) / sizeof( wxString );
m_choiceRepeatVertical = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceRepeatVerticalNChoices, m_choiceRepeatVerticalChoices, 0 );
m_choiceRepeatVertical->SetSelection( 0 );
@@ -91,7 +94,7 @@ DIALOG_LIBEDIT_DIMENSIONS_BASE::DIALOG_LIBEDIT_DIMENSIONS_BASE( wxWindow* parent
m_staticRepeatYUnits->Wrap( -1 );
fgSizer1->Add( m_staticRepeatYUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
- m_staticText15 = new wxStaticText( this, wxID_ANY, _("Current &pin lenght"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText15 = new wxStaticText( this, wxID_ANY, _("Current &pin lenght:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText15->Wrap( -1 );
fgSizer1->Add( m_staticText15, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
@@ -102,7 +105,7 @@ DIALOG_LIBEDIT_DIMENSIONS_BASE::DIALOG_LIBEDIT_DIMENSIONS_BASE( wxWindow* parent
m_staticText161->Wrap( -1 );
fgSizer1->Add( m_staticText161, 0, wxALL, 5 );
- m_CurrentPinNameSizeText = new wxStaticText( this, wxID_ANY, _("Current pin name size"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_CurrentPinNameSizeText = new wxStaticText( this, wxID_ANY, _("Current pin name size:"), wxDefaultPosition, wxDefaultSize, 0 );
m_CurrentPinNameSizeText->Wrap( -1 );
fgSizer1->Add( m_CurrentPinNameSizeText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
@@ -113,7 +116,7 @@ DIALOG_LIBEDIT_DIMENSIONS_BASE::DIALOG_LIBEDIT_DIMENSIONS_BASE( wxWindow* parent
m_staticText18->Wrap( -1 );
fgSizer1->Add( m_staticText18, 0, wxALL, 5 );
- m_CurrentPinNumberSizeText = new wxStaticText( this, wxID_ANY, _("Current pin number size"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_CurrentPinNumberSizeText = new wxStaticText( this, wxID_ANY, _("Current pin number size:"), wxDefaultPosition, wxDefaultSize, 0 );
m_CurrentPinNumberSizeText->Wrap( -1 );
fgSizer1->Add( m_CurrentPinNumberSizeText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
@@ -134,10 +137,16 @@ DIALOG_LIBEDIT_DIMENSIONS_BASE::DIALOG_LIBEDIT_DIMENSIONS_BASE( wxWindow* parent
fgSizer1->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 3 );
- bSizerMain->Add( fgSizer1, 0, wxALIGN_CENTER|wxEXPAND, 0 );
+ mainSizer->Add( fgSizer1, 0, wxALIGN_CENTER|wxEXPAND, 0 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerMain->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
+ mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
+
+ wxBoxSizer* bSizerBttons;
+ bSizerBttons = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonSave = new wxButton( this, wxID_ANY, _("Save as Default"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerBttons->Add( m_buttonSave, 0, wxALL, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK );
@@ -145,9 +154,9 @@ DIALOG_LIBEDIT_DIMENSIONS_BASE::DIALOG_LIBEDIT_DIMENSIONS_BASE( wxWindow* parent
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize();
- bSizerMain->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 0 );
+ bSizerBttons->Add( m_sdbSizer1, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 0 );
- mainSizer->Add( bSizerMain, 1, wxALL|wxEXPAND, 12 );
+ mainSizer->Add( bSizerBttons, 0, wxALIGN_RIGHT, 5 );
this->SetSizer( mainSizer );
this->Layout();
diff --git a/eeschema/dialog_libedit_dimensions_base.fbp b/eeschema/dialog_libedit_dimensions_base.fbp
index 1807e42f46..4ce0ae9136 100644
--- a/eeschema/dialog_libedit_dimensions_base.fbp
+++ b/eeschema/dialog_libedit_dimensions_base.fbp
@@ -32,7 +32,7 @@
DIALOG_LIBEDIT_DIMENSIONS_BASE
- 412,358
+ 412,349
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
Library Editor Options
@@ -73,1401 +73,82 @@