diff --git a/common/dialogs/dialog_print_generic_base.cpp b/common/dialogs/dialog_print_generic_base.cpp index b6da774201..5750e9ea8d 100644 --- a/common/dialogs/dialog_print_generic_base.cpp +++ b/common/dialogs/dialog_print_generic_base.cpp @@ -1,8 +1,8 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jul 17 2016) +// C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // -// PLEASE DO "NOT" EDIT THIS FILE! +// PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// #include "dialog_print_generic_base.h" @@ -12,88 +12,92 @@ DIALOG_PRINT_GENERIC_BASE::DIALOG_PRINT_GENERIC_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); - + wxBoxSizer* bMainSizer; bMainSizer = new wxBoxSizer( wxVERTICAL ); - + bUpperSizer = new wxBoxSizer( wxHORIZONTAL ); - + wxBoxSizer* bOptionsSizer; bOptionsSizer = new wxBoxSizer( wxVERTICAL ); - + sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL ); - + gbOptionsSizer = new wxGridBagSizer( 2, 0 ); gbOptionsSizer->SetFlexibleDirection( wxBOTH ); gbOptionsSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - + gbOptionsSizer->SetEmptyCellSize( wxSize( -1,10 ) ); + m_outputModeLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Output mode:"), wxDefaultPosition, wxDefaultSize, 0 ); m_outputModeLabel->Wrap( -1 ); gbOptionsSizer->Add( m_outputModeLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - + wxString m_outputModeChoices[] = { _("Color"), _("Black and white") }; int m_outputModeNChoices = sizeof( m_outputModeChoices ) / sizeof( wxString ); m_outputMode = new wxChoice( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_outputModeNChoices, m_outputModeChoices, 0 ); m_outputMode->SetSelection( 0 ); gbOptionsSizer->Add( m_outputMode, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 ); - + m_titleBlock = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_FRAME_SEL, _("Print border and title block"), wxDefaultPosition, wxDefaultSize, 0 ); - m_titleBlock->SetValue(true); + m_titleBlock->SetValue(true); m_titleBlock->SetToolTip( _("Print Frame references.") ); - + gbOptionsSizer->Add( m_titleBlock, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxALL|wxEXPAND, 5 ); - - + + gbOptionsSizer->AddGrowableCol( 1 ); - + sbOptionsSizer->Add( gbOptionsSizer, 1, wxEXPAND, 5 ); - - + + bOptionsSizer->Add( sbOptionsSizer, 1, wxEXPAND|wxALL, 5 ); - + wxStaticBoxSizer* bScaleSizer; bScaleSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scale") ), wxVERTICAL ); - + m_scale1 = new wxRadioButton( bScaleSizer->GetStaticBox(), wxID_ANY, _("1:1"), wxDefaultPosition, wxDefaultSize, 0 ); - bScaleSizer->Add( m_scale1, 0, wxALL, 5 ); - + bScaleSizer->Add( m_scale1, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + + bScaleSizer->Add( 0, 2, 0, 0, 5 ); + m_scaleFit = new wxRadioButton( bScaleSizer->GetStaticBox(), wxID_ANY, _("Fit to page"), wxDefaultPosition, wxDefaultSize, 0 ); - bScaleSizer->Add( m_scaleFit, 0, wxALL|wxTOP, 5 ); - + bScaleSizer->Add( m_scaleFit, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + wxBoxSizer* bSizer10; bSizer10 = new wxBoxSizer( wxHORIZONTAL ); - + m_scaleCustom = new wxRadioButton( bScaleSizer->GetStaticBox(), wxID_ANY, _("Custom:"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer10->Add( m_scaleCustom, 0, wxALL|wxTOP, 5 ); - + bSizer10->Add( m_scaleCustom, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_scaleCustomText = new wxTextCtrl( bScaleSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_scaleCustomText->SetToolTip( _("Set X scale adjust for exact scale plotting") ); - - bSizer10->Add( m_scaleCustomText, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - + + bSizer10->Add( m_scaleCustomText, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + bScaleSizer->Add( bSizer10, 1, wxEXPAND, 5 ); - - + + bOptionsSizer->Add( bScaleSizer, 0, wxALL|wxEXPAND, 5 ); - - + + bUpperSizer->Add( bOptionsSizer, 1, wxEXPAND, 5 ); - - + + bMainSizer->Add( bUpperSizer, 1, wxEXPAND|wxALL, 5 ); - + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 ); - + wxBoxSizer* bButtonsSizer; bButtonsSizer = new wxBoxSizer( wxHORIZONTAL ); - + m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Setup..."), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonOption->SetMinSize( wxSize( 120,-1 ) ); - + bButtonsSizer->Add( m_buttonOption, 0, wxALL|wxEXPAND, 5 ); - + m_sdbSizer1 = new wxStdDialogButtonSizer(); m_sdbSizer1OK = new wxButton( this, wxID_OK ); m_sdbSizer1->AddButton( m_sdbSizer1OK ); @@ -102,18 +106,18 @@ DIALOG_PRINT_GENERIC_BASE::DIALOG_PRINT_GENERIC_BASE( wxWindow* parent, wxWindow m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL ); m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); m_sdbSizer1->Realize(); - + bButtonsSizer->Add( m_sdbSizer1, 1, wxALL|wxEXPAND, 5 ); - - + + bMainSizer->Add( bButtonsSizer, 0, wxEXPAND|wxLEFT, 10 ); - - + + this->SetSizer( bMainSizer ); this->Layout(); - + this->Centre( wxBOTH ); - + // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_GENERIC_BASE::onClose ) ); m_scaleCustomText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onSetCustomScale ), NULL, this ); @@ -132,5 +136,5 @@ DIALOG_PRINT_GENERIC_BASE::~DIALOG_PRINT_GENERIC_BASE() m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPrintPreview ), NULL, this ); m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onCloseButton ), NULL, this ); m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_GENERIC_BASE::onPrintButtonClick ), NULL, this ); - + } diff --git a/common/dialogs/dialog_print_generic_base.fbp b/common/dialogs/dialog_print_generic_base.fbp index 34df2ab176..e520b9b0c3 100644 --- a/common/dialogs/dialog_print_generic_base.fbp +++ b/common/dialogs/dialog_print_generic_base.fbp @@ -2,7 +2,7 @@ - + C++ 1 source_name @@ -14,11 +14,12 @@ dialog_print_generic_base 1000 none + 1 DIALOG_PRINT_GENERIC - + . - + 1 1 1 @@ -29,67 +30,32 @@ 0 wxAUI_MGR_DEFAULT - + wxBOTH - + 1 1 impl_virtual - - - + + + 0 wxID_ANY - + -1,-1 DIALOG_PRINT_GENERIC_BASE - + 410,476 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Print - - - - - - - - - - - - - + + + + onClose - - - - - - - - - - - - - - - - - - - - - - - - - - - + bMainSizer wxVERTICAL none @@ -98,7 +64,7 @@ wxEXPAND|wxALL 1 - + bUpperSizer wxHORIZONTAL protected @@ -107,7 +73,7 @@ wxEXPAND 1 - + bOptionsSizer wxVERTICAL none @@ -118,23 +84,22 @@ wxID_ANY Options - + sbOptionsSizer wxVERTICAL 1 protected - 5 wxEXPAND 1 - + -1,10 wxBOTH 1 - + 0 - + gbOptionsSizer wxFLEX_GROWMODE_SPECIFIED protected @@ -151,78 +116,56 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Output mode: - + 0 + 0 - - + + 0 - + 1 m_outputModeLabel 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -237,83 +180,59 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 "Color" "Black and white" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_outputMode 1 - - + + protected 1 - + Resizable 0 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -328,83 +247,59 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_FRAME_SEL Print border and title block - + 0 - - + + 0 - + 1 m_titleBlock 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 Print Frame references. - + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -418,186 +313,147 @@ wxID_ANY Scale - + bScaleSizer wxVERTICAL 1 none - 5 - wxALL + wxBOTTOM|wxRIGHT|wxLEFT 0 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY 1:1 - + 0 - - + + 0 - + 1 m_scale1 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + 5 + + 0 + + 2 + protected + 0 5 - wxALL|wxTOP + wxBOTTOM|wxRIGHT|wxLEFT 0 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Fit to page - + 0 - - + + 0 - + 1 m_scaleFit 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -605,187 +461,137 @@ wxEXPAND 1 - + bSizer10 wxHORIZONTAL none 5 - wxALL|wxTOP + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT 0 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Custom: - + 0 - - + + 0 - + 1 m_scaleCustom 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL 1 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_scaleCustomText 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 Set X scale adjust for exact scale plotting - - + + wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + onSetCustomScale - - - - @@ -805,76 +611,53 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_staticline1 1 - - + + protected 1 - + Resizable 1 - + wxLI_HORIZONTAL ; forward_declare 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -882,7 +665,7 @@ wxEXPAND|wxLEFT 0 - + bButtonsSizer wxHORIZONTAL none @@ -895,83 +678,68 @@ 1 1 1 - - - - - - - + + + + + + + + 1 0 1 - + 1 + 0 0 + Dock 0 Left 1 - + 1 - + + 0 0 wxID_PRINT_OPTIONS Page Setup... - + + 0 + 0 - - + + 0 120,-1 1 m_buttonOption 1 - - + + protected 1 - + + + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + onPageSetup - - - - - - - - - - - - - - - - - - - - - - - @@ -987,17 +755,12 @@ 1 0 0 - + m_sdbSizer1 protected onPrintPreview onCloseButton - - - onPrintButtonClick - - diff --git a/common/dialogs/dialog_print_generic_base.h b/common/dialogs/dialog_print_generic_base.h index 375cc68564..cb4f2f9c4d 100644 --- a/common/dialogs/dialog_print_generic_base.h +++ b/common/dialogs/dialog_print_generic_base.h @@ -1,18 +1,15 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jul 17 2016) +// C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // -// PLEASE DO "NOT" EDIT THIS FILE! +// PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __DIALOG_PRINT_GENERIC_BASE_H__ -#define __DIALOG_PRINT_GENERIC_BASE_H__ +#pragma once #include #include #include -class DIALOG_SHIM; - #include "dialog_shim.h" #include #include @@ -28,6 +25,9 @@ class DIALOG_SHIM; #include #include #include +#include +#include +#include #include #include @@ -39,14 +39,14 @@ class DIALOG_SHIM; class DIALOG_PRINT_GENERIC_BASE : public DIALOG_SHIM { private: - + protected: enum { wxID_FRAME_SEL = 1000, wxID_PRINT_OPTIONS }; - + wxBoxSizer* bUpperSizer; wxStaticBoxSizer* sbOptionsSizer; wxGridBagSizer* gbOptionsSizer; @@ -63,7 +63,7 @@ class DIALOG_PRINT_GENERIC_BASE : public DIALOG_SHIM wxButton* m_sdbSizer1OK; wxButton* m_sdbSizer1Apply; wxButton* m_sdbSizer1Cancel; - + // Virtual event handlers, overide them in your derived class virtual void onClose( wxCloseEvent& event ) { event.Skip(); } virtual void onSetCustomScale( wxCommandEvent& event ) { event.Skip(); } @@ -71,13 +71,12 @@ class DIALOG_PRINT_GENERIC_BASE : public DIALOG_SHIM virtual void onPrintPreview( wxCommandEvent& event ) { event.Skip(); } virtual void onCloseButton( wxCommandEvent& event ) { event.Skip(); } virtual void onPrintButtonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - DIALOG_PRINT_GENERIC_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 410,476 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DIALOG_PRINT_GENERIC_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 410,476 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_PRINT_GENERIC_BASE(); - + }; -#endif //__DIALOG_PRINT_GENERIC_BASE_H__ diff --git a/pcbnew/dialogs/dialog_print_pcbnew.cpp b/pcbnew/dialogs/dialog_print_pcbnew.cpp index d5945548b8..1d3c049a5b 100644 --- a/pcbnew/dialogs/dialog_print_pcbnew.cpp +++ b/pcbnew/dialogs/dialog_print_pcbnew.cpp @@ -202,73 +202,82 @@ void DIALOG_PRINT_PCBNEW::createExtraOptions() m_checkUseTheme = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _( "Use a different color theme for printing" ), wxDefaultPosition, wxDefaultSize, 0 ); - optionsSizer->Add( m_checkUseTheme, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 3 ), wxALL, 5 ); + optionsSizer->Add( m_checkUseTheme, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 3 ), + wxLEFT | wxRIGHT | wxTOP, 5 ); m_checkUseTheme->Bind( wxEVT_COMMAND_CHECKBOX_CLICKED, &DIALOG_PRINT_PCBNEW::onUseThemeChecked, this ); - m_lblTheme = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _( "Color theme:" ), - wxDefaultPosition, wxDefaultSize, 0 ); + m_lblTheme = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _( "Theme:" ), + wxDefaultPosition, wxDefaultSize, 0 ); m_lblTheme->Wrap( -1 ); optionsSizer->Add( m_lblTheme, wxGBPosition( rows, 0 ), wxGBSpan( 1, 1 ), - wxALIGN_CENTER_VERTICAL | wxALL, 5 ); + wxALIGN_CENTER_VERTICAL | wxLEFT, 25 ); wxArrayString m_colorThemeChoices; m_colorTheme = new wxChoice( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, - wxDefaultSize, m_colorThemeChoices, 0 ); + wxDefaultSize, m_colorThemeChoices, 0 ); m_colorTheme->SetSelection( 0 ); - optionsSizer->Add( m_colorTheme, wxGBPosition( rows++, 1 ), wxGBSpan( 1, 2 ), wxALL, 5 ); + optionsSizer->Add( m_colorTheme, wxGBPosition( rows++, 1 ), wxGBSpan( 1, 2 ), + wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5 ); // Drill marks option auto drillMarksLabel = new wxStaticText( box, wxID_ANY, _( "Drill marks:" ) ); - std::vector drillMarkChoices = - { _( "No drill mark" ), _( "Small mark" ), _( "Real drill" ) }; - m_drillMarksChoice = new wxChoice( box, wxID_ANY, wxDefaultPosition, - wxDefaultSize, drillMarkChoices.size(), drillMarkChoices.data(), 0 ); + std::vector drillMarkChoices = { _( "No drill mark" ), + _( "Small mark" ), + _( "Real drill" ) }; + m_drillMarksChoice = new wxChoice( box, wxID_ANY, wxDefaultPosition, wxDefaultSize, + drillMarkChoices.size(), drillMarkChoices.data(), 0 ); m_drillMarksChoice->SetSelection( 0 ); // Print mirrored m_checkboxMirror = new wxCheckBox( box, wxID_ANY, _( "Print mirrored" ) ); // Pagination - std::vector pagesOption = { _( "One page per layer" ), _( "All layers on single page" ) }; + std::vector pagesOption = { _( "One page per layer" ), + _( "All layers on single page" ) }; m_boxPagination = new wxRadioBox( box, wxID_ANY, _( "Pagination" ), wxDefaultPosition, - wxDefaultSize, pagesOption.size(), pagesOption.data(), 1, wxRA_SPECIFY_COLS ); + wxDefaultSize, pagesOption.size(), pagesOption.data(), 1, + wxRA_SPECIFY_COLS ); m_boxPagination->SetSelection( 0 ); // Sizer layout + rows++; + optionsSizer->Add( drillMarksLabel, wxGBPosition( rows, 0 ), wxGBSpan( 1, 1 ), - wxBOTTOM | wxRIGHT | wxLEFT | wxALIGN_CENTER_VERTICAL, 5 ); + wxBOTTOM | wxRIGHT | wxLEFT | wxALIGN_CENTER_VERTICAL, 5 ); optionsSizer->Add( m_drillMarksChoice, wxGBPosition( rows, 1 ), wxGBSpan( 1, cols - 1 ), - wxBOTTOM | wxRIGHT | wxLEFT, 5 ); + wxBOTTOM | wxRIGHT | wxLEFT, 5 ); optionsSizer->Add( m_checkboxMirror, wxGBPosition( rows + 1, 0 ), wxGBSpan( 1, cols ), - wxBOTTOM | wxRIGHT | wxLEFT, 5 ); + wxBOTTOM | wxRIGHT | wxLEFT, 5 ); optionsSizer->Add( m_boxPagination, wxGBPosition( rows + 2, 0 ), wxGBSpan( 1, cols ), - wxALL | wxEXPAND, 5 ); + wxALL | wxEXPAND, 5 ); } void DIALOG_PRINT_PCBNEW::createLeftPanel() { - wxStaticBoxSizer* sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, - wxID_ANY, _( "Included Layers" ) ), wxVERTICAL ); + wxStaticBox* box = new wxStaticBox( this, wxID_ANY, _( "Included Layers" ) ); + wxStaticBoxSizer* sbLayersSizer = new wxStaticBoxSizer( box, wxVERTICAL ); // Copper layer list - auto copperLabel = new wxStaticText( sbLayersSizer->GetStaticBox(), wxID_ANY, _( "Copper layers:" ) ); + auto copperLabel = new wxStaticText( sbLayersSizer->GetStaticBox(), wxID_ANY, + _( "Copper layers:" ) ); m_listCopperLayers = new wxCheckListBox( sbLayersSizer->GetStaticBox(), wxID_ANY ); wxBoxSizer* sizerLeft = new wxBoxSizer( wxVERTICAL ); - sizerLeft->Add( copperLabel, 0, wxRIGHT | wxLEFT, 5 ); - sizerLeft->Add( m_listCopperLayers, 1, wxEXPAND | wxBOTTOM | wxRIGHT | wxLEFT, 5 ); + sizerLeft->Add( copperLabel, 0, wxRIGHT, 5 ); + sizerLeft->Add( m_listCopperLayers, 1, wxEXPAND | wxBOTTOM | wxRIGHT, 5 ); // Technical layer list - auto technicalLabel = new wxStaticText( sbLayersSizer->GetStaticBox(), wxID_ANY, _( "Technical layers:" ) ); + auto technicalLabel = new wxStaticText( sbLayersSizer->GetStaticBox(), wxID_ANY, + _( "Technical layers:" ) ); m_listTechLayers = new wxCheckListBox( sbLayersSizer->GetStaticBox(), wxID_ANY ); wxBoxSizer* sizerRight = new wxBoxSizer( wxVERTICAL ); - sizerRight->Add( technicalLabel, 0, wxRIGHT | wxLEFT, 5 ); - sizerRight->Add( m_listTechLayers, 1, wxEXPAND | wxBOTTOM | wxRIGHT | wxLEFT, 5 ); + sizerRight->Add( technicalLabel, 0, wxLEFT, 5 ); + sizerRight->Add( m_listTechLayers, 1, wxEXPAND | wxBOTTOM | wxLEFT, 5 ); // Layer list layout @@ -287,8 +296,8 @@ void DIALOG_PRINT_PCBNEW::createLeftPanel() wxCommandEventHandler( DIALOG_PRINT_PCBNEW::onDeselectAllClick ), NULL, this ); wxBoxSizer* buttonSizer = new wxBoxSizer( wxHORIZONTAL ); - buttonSizer->Add( m_buttonSelectAll, 1, wxALL, 5 ); - buttonSizer->Add( m_buttonDeselectAll, 1, wxALL, 5 ); + buttonSizer->Add( m_buttonSelectAll, 1, wxRIGHT | wxTOP | wxBOTTOM, 5 ); + buttonSizer->Add( m_buttonDeselectAll, 1, wxLEFT | wxTOP | wxBOTTOM, 5 ); // Exclude Edge.Pcb layer checkbox @@ -296,11 +305,11 @@ void DIALOG_PRINT_PCBNEW::createLeftPanel() m_checkboxNoEdge->SetToolTip( _("Exclude contents of Edges_Pcb layer from all other layers") ); // Static box sizer layout - sbLayersSizer->Add( bLayerListsSizer, 1, wxALL | wxEXPAND, 5 ); - sbLayersSizer->Add( buttonSizer, 0, wxALL | wxEXPAND, 5 ); - sbLayersSizer->Add( m_checkboxNoEdge, 0, wxALL | wxEXPAND, 5 ); + sbLayersSizer->Add( bLayerListsSizer, 1, wxRIGHT | wxEXPAND, 5 ); + sbLayersSizer->Add( buttonSizer, 0, wxRIGHT | wxEXPAND, 5 ); + sbLayersSizer->Add( m_checkboxNoEdge, 0, wxTOP | wxRIGHT | wxBOTTOM | wxEXPAND, 5 ); - getMainSizer()->Insert( 0, sbLayersSizer, 1, wxEXPAND ); + getMainSizer()->Insert( 0, sbLayersSizer, 1, wxEXPAND | wxALL, 5 ); }