PCB calculator: fix regulator dialog layout.

Set default dialog size to -1,-1 to allow the dialog to size itself
properly to prevent the buttons in the standard dialog button sizer
from being truncated.

Fixes lp:1839695

https://bugs.launchpad.net/kicad/+bug/1839695
This commit is contained in:
Wayne Stambaugh 2019-08-12 09:30:46 -04:00
parent 9b6e1cb1cd
commit e3e546f7d2
3 changed files with 825 additions and 824 deletions

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jul 10 2019)
// C++ code generated with wxFormBuilder (version Aug 12 2019)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -16,7 +16,7 @@ DIALOG_EDITOR_DATA_BASE::DIALOG_EDITOR_DATA_BASE( wxWindow* parent, wxWindowID i
wxBoxSizer* bSizerMain;
bSizerMain = new wxBoxSizer( wxVERTICAL );
bSizerMain->SetMinSize( wxSize( 350,-1 ) );
bSizerMain->SetMinSize( wxSize( 300,-1 ) );
wxFlexGridSizer* fgSizerPrms;
fgSizerPrms = new wxFlexGridSizer( 4, 3, 0, 0 );
fgSizerPrms->AddGrowableCol( 1 );
@ -29,7 +29,7 @@ DIALOG_EDITOR_DATA_BASE::DIALOG_EDITOR_DATA_BASE( wxWindow* parent, wxWindowID i
fgSizerPrms->Add( m_staticTextName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_textCtrlName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerPrms->Add( m_textCtrlName, 0, wxALL|wxEXPAND, 5 );
fgSizerPrms->Add( m_textCtrlName, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
fgSizerPrms->Add( 0, 0, 1, wxEXPAND, 5 );
@ -39,7 +39,7 @@ DIALOG_EDITOR_DATA_BASE::DIALOG_EDITOR_DATA_BASE( wxWindow* parent, wxWindowID i
fgSizerPrms->Add( m_staticTextVref, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_textCtrlVref = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerPrms->Add( m_textCtrlVref, 0, wxALL|wxEXPAND, 5 );
fgSizerPrms->Add( m_textCtrlVref, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
m_staticTextVrefUnit = new wxStaticText( this, wxID_ANY, _("Volt"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextVrefUnit->Wrap( -1 );
@ -53,7 +53,7 @@ DIALOG_EDITOR_DATA_BASE::DIALOG_EDITOR_DATA_BASE( wxWindow* parent, wxWindowID i
int m_choiceRegTypeNChoices = sizeof( m_choiceRegTypeChoices ) / sizeof( wxString );
m_choiceRegType = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceRegTypeNChoices, m_choiceRegTypeChoices, 0 );
m_choiceRegType->SetSelection( 0 );
fgSizerPrms->Add( m_choiceRegType, 0, wxALL|wxEXPAND, 5 );
fgSizerPrms->Add( m_choiceRegType, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
fgSizerPrms->Add( 0, 0, 1, wxEXPAND, 5 );
@ -63,7 +63,7 @@ DIALOG_EDITOR_DATA_BASE::DIALOG_EDITOR_DATA_BASE( wxWindow* parent, wxWindowID i
fgSizerPrms->Add( m_RegulIadjTitle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_RegulIadjValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerPrms->Add( m_RegulIadjValue, 0, wxALL|wxEXPAND, 5 );
fgSizerPrms->Add( m_RegulIadjValue, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
m_IadjUnitLabel = new wxStaticText( this, wxID_ANY, _("uA"), wxDefaultPosition, wxDefaultSize, 0 );
m_IadjUnitLabel->Wrap( -1 );
@ -76,7 +76,7 @@ DIALOG_EDITOR_DATA_BASE::DIALOG_EDITOR_DATA_BASE( wxWindow* parent, wxWindowID i
bSizerMain->Add( 0, 0, 1, wxEXPAND, 5 );
m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline, 0, wxEXPAND | wxALL, 5 );
bSizerMain->Add( m_staticline, 0, wxEXPAND, 5 );
m_sdbSizer = new wxStdDialogButtonSizer();
m_sdbSizerOK = new wxButton( this, wxID_OK );
@ -85,11 +85,12 @@ DIALOG_EDITOR_DATA_BASE::DIALOG_EDITOR_DATA_BASE( wxWindow* parent, wxWindowID i
m_sdbSizer->AddButton( m_sdbSizerCancel );
m_sdbSizer->Realize();
bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
bSizerMain->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
this->SetSizer( bSizerMain );
this->Layout();
bSizerMain->Fit( this );
this->Centre( wxBOTH );

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jul 10 2019)
// C++ code generated with wxFormBuilder (version Aug 12 2019)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -57,7 +57,7 @@ class DIALOG_EDITOR_DATA_BASE : public DIALOG_SHIM
public:
DIALOG_EDITOR_DATA_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Regulator Parameters"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 348,210 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_EDITOR_DATA_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Regulator Parameters"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_EDITOR_DATA_BASE();
};