Minor Pcbnew dialog fixes.

Fix get footprint by name dialog button sizer padding.

Fix export gencad dialog file name, options, and button sizer padding.
This commit is contained in:
Wayne Stambaugh 2018-06-27 14:27:38 -04:00
parent 80fa480388
commit 7eea8f808d
4 changed files with 598 additions and 592 deletions

View File

@ -2,6 +2,8 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2017 CERN
* Copyright (C) 2018 KiCad Developers, see change_log.txt for contributors.
*
* @author Maciej Suminski <maciej.suminski@cern.ch>
*
* This program is free software; you can redistribute it and/or
@ -34,7 +36,8 @@
#include <wx/button.h>
DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aParent )
: DIALOG_SHIM( aParent, wxID_ANY, _( "Export to GenCAD settings" ) )
: DIALOG_SHIM( aParent, wxID_ANY, _( "Export to GenCAD settings" ), wxDefaultPosition,
wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER )
{
// Obtain a potential filename for the exported file
wxFileName fn = aParent->GetBoard()->GetFileName();
@ -48,23 +51,23 @@ DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aPar
wxBoxSizer* m_fileSizer = new wxBoxSizer( wxHORIZONTAL );
m_filePath = new wxTextCtrl( this, wxID_ANY, fn.GetFullPath() );
m_fileSizer->Add( m_filePath, 1, wxALL, 5 );
m_fileSizer->Add( m_filePath, 1, wxEXPAND | wxRIGHT, 5 );
wxButton* m_browseBtn = new wxButton( this, wxID_ANY, _( "Browse" ) );
m_browseBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
wxCommandEventHandler( DIALOG_GENCAD_EXPORT_OPTIONS::onBrowse ), NULL, this );
m_fileSizer->Add( m_browseBtn, 0, wxALL, 5 );
m_fileSizer->Add( m_browseBtn, 0 );
m_mainSizer->Add( m_fileSizer, 0, wxEXPAND, 5 );
m_mainSizer->Add( m_fileSizer, 0, wxEXPAND | wxALL, 5 );
m_optsSizer = new wxGridSizer( 0, 1, 0, 0 );
m_optsSizer = new wxGridSizer( 0, 1, 3, 3 );
createOptCheckboxes();
m_mainSizer->Add( m_optsSizer, 1, wxEXPAND, 5 );
m_mainSizer->Add( m_optsSizer, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
wxSizer* stdButtons = CreateSeparatedButtonSizer( wxOK | wxCANCEL );
m_mainSizer->Add( stdButtons, 0, wxEXPAND, 5 );
m_mainSizer->Add( stdButtons, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
SetSizer( m_mainSizer );
Layout();
@ -139,7 +142,7 @@ void DIALOG_GENCAD_EXPORT_OPTIONS::createOptCheckboxes()
{
wxCheckBox* chkbox = new wxCheckBox( this, wxID_ANY, option.second );
m_options[option.first] = chkbox;
m_optsSizer->Add( chkbox, 0, wxALL, 5 );
m_optsSizer->Add( chkbox );
}
}

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// C++ code generated with wxFormBuilder (version Jun 27 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -47,7 +47,7 @@ DIALOG_GET_FOOTPRINT_BY_NAME_BASE::DIALOG_GET_FOOTPRINT_BY_NAME_BASE( wxWindow*
bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
bSizerMain->Add( m_staticline1, 0, wxALL|wxEXPAND, 5 );
m_sdbSizer = new wxStdDialogButtonSizer();
m_sdbSizerOK = new wxButton( this, wxID_OK );
@ -56,7 +56,7 @@ DIALOG_GET_FOOTPRINT_BY_NAME_BASE::DIALOG_GET_FOOTPRINT_BY_NAME_BASE( wxWindow*
m_sdbSizer->AddButton( m_sdbSizerCancel );
m_sdbSizer->Realize();
bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bSizerMain->Add( m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
this->SetSizer( bSizerMain );

View File

@ -14,6 +14,7 @@
<property name="file">dialog_get_footprint_by_name_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_get_footprint_by_name</property>
<property name="namespace"></property>
@ -151,6 +152,7 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Reference:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -325,6 +327,7 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Available:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -469,7 +472,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="1">
<property name="BottomDockable">1</property>
@ -550,7 +553,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="1">
<property name="Apply">0</property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// C++ code generated with wxFormBuilder (version Jun 27 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!