From d50dc4ff651b98a7d8e59ada22fc6bda0b2c8b2d Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 15 Aug 2019 10:26:08 +0200 Subject: [PATCH] PANEL_SETUP_LAYERS: minor cosmetic change: Fix for commit e2be49a2. The commit e2be49a2 was sent too early. --- pcbnew/dialogs/panel_setup_layers_base.cpp | 35 ++- pcbnew/dialogs/panel_setup_layers_base.fbp | 269 ++++++++++----------- pcbnew/dialogs/panel_setup_layers_base.h | 2 +- 3 files changed, 150 insertions(+), 156 deletions(-) diff --git a/pcbnew/dialogs/panel_setup_layers_base.cpp b/pcbnew/dialogs/panel_setup_layers_base.cpp index 7575032921..fd43d9f0c4 100644 --- a/pcbnew/dialogs/panel_setup_layers_base.cpp +++ b/pcbnew/dialogs/panel_setup_layers_base.cpp @@ -17,52 +17,47 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i wxBoxSizer* bSizerMargins; bSizerMargins = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizerLayerCnt; + bSizerLayerCnt = new wxBoxSizer( wxHORIZONTAL ); + wxString m_PresetsChoiceChoices[] = { _("Custom layer set"), _("Two layers, parts on Front"), _("Two layers, parts on Back"), _("Two layers, parts on Front & Back"), _("Four layers, parts on Front"), _("Four layers, parts on Front & Back"), _("All layers on") }; int m_PresetsChoiceNChoices = sizeof( m_PresetsChoiceChoices ) / sizeof( wxString ); m_PresetsChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PresetsChoiceNChoices, m_PresetsChoiceChoices, 0 ); m_PresetsChoice->SetSelection( 0 ); - bSizerMargins->Add( m_PresetsChoice, 0, wxALL|wxEXPAND, 5 ); + bSizerLayerCnt->Add( m_PresetsChoice, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + - wxBoxSizer* bSizer4; - bSizer4 = new wxBoxSizer( wxHORIZONTAL ); + bSizerLayerCnt->Add( 15, 0, 0, 0, 5 ); m_staticTextCopperLayers = new wxStaticText( this, wxID_ANY, _("Copper layers:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextCopperLayers->Wrap( -1 ); - bSizer4->Add( m_staticTextCopperLayers, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + bSizerLayerCnt->Add( m_staticTextCopperLayers, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); wxString m_CopperLayersChoiceChoices[] = { _("2"), _("4"), _("6"), _("8"), _("10"), _("12"), _("14"), _("16"), _("18"), _("20"), _("22"), _("24"), _("26"), _("28"), _("30"), _("32") }; int m_CopperLayersChoiceNChoices = sizeof( m_CopperLayersChoiceChoices ) / sizeof( wxString ); m_CopperLayersChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_CopperLayersChoiceNChoices, m_CopperLayersChoiceChoices, 0 ); m_CopperLayersChoice->SetSelection( 0 ); - bSizer4->Add( m_CopperLayersChoice, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + bSizerLayerCnt->Add( m_CopperLayersChoice, 0, wxALL|wxALIGN_CENTER_VERTICAL, 3 ); - bSizer4->Add( 40, 0, 0, 0, 5 ); + bSizerLayerCnt->Add( 15, 0, 0, 0, 5 ); m_thicknessLabel = new wxStaticText( this, wxID_ANY, _("PCB thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); m_thicknessLabel->Wrap( -1 ); - bSizer4->Add( m_thicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + bSizerLayerCnt->Add( m_thicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); m_thicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_thicknessCtrl->SetMinSize( wxSize( 190,-1 ) ); - - bSizer4->Add( m_thicknessCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + bSizerLayerCnt->Add( m_thicknessCtrl, 0, wxEXPAND|wxALL, 3 ); m_thicknessUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); m_thicknessUnits->Wrap( -1 ); - bSizer4->Add( m_thicknessUnits, 0, wxALL|wxALIGN_CENTER_VERTICAL, 3 ); + bSizerLayerCnt->Add( m_thicknessUnits, 0, wxALL|wxALIGN_CENTER_VERTICAL, 3 ); - bSizerMargins->Add( bSizer4, 1, wxEXPAND, 5 ); - - wxBoxSizer* bLineMargins; - bLineMargins = new wxBoxSizer( wxVERTICAL ); + bSizerMargins->Add( bSizerLayerCnt, 0, wxEXPAND, 5 ); m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bLineMargins->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 ); - - - bSizerMargins->Add( bLineMargins, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + bSizerMargins->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); m_LayersListPanel = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL|wxVSCROLL ); m_LayersListPanel->SetScrollRate( 0, 5 ); @@ -767,7 +762,7 @@ PANEL_SETUP_LAYERS_BASE::PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID i bSizerMargins->Add( m_LayersListPanel, 1, wxEXPAND|wxALL, 5 ); - bMainSizer->Add( bSizerMargins, 1, wxEXPAND|wxRIGHT, 10 ); + bMainSizer->Add( bSizerMargins, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 ); this->SetSizer( bMainSizer ); diff --git a/pcbnew/dialogs/panel_setup_layers_base.fbp b/pcbnew/dialogs/panel_setup_layers_base.fbp index 23236c5b13..0edb16fc63 100644 --- a/pcbnew/dialogs/panel_setup_layers_base.fbp +++ b/pcbnew/dialogs/panel_setup_layers_base.fbp @@ -45,7 +45,7 @@ PANEL_SETUP_LAYERS_BASE - 585,545 + 621,545 ; forward_declare @@ -58,87 +58,97 @@ none 10 - wxEXPAND|wxRIGHT + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 1 bSizerMargins wxVERTICAL none - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Custom layer set" "Two layers, parts on Front" "Two layers, parts on Back" "Two layers, parts on Front & Back" "Four layers, parts on Front" "Four layers, parts on Front & Back" "All layers on" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_PresetsChoice - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnPresetsChoice - - 5 wxEXPAND - 1 + 0 - bSizer4 + bSizerLayerCnt wxHORIZONTAL none + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Custom layer set" "Two layers, parts on Front" "Two layers, parts on Back" "Two layers, parts on Front & Back" "Four layers, parts on Front" "Four layers, parts on Front & Back" "All layers on" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_PresetsChoice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnPresetsChoice + + + + 5 + + 0 + + 0 + protected + 15 + + 3 wxALIGN_CENTER_VERTICAL|wxALL @@ -202,7 +212,7 @@ 3 - wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -272,7 +282,7 @@ 0 protected - 40 + 15 @@ -338,7 +348,7 @@ 3 - wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL + wxEXPAND|wxALL 0 1 @@ -374,7 +384,7 @@ 0 - 190,-1 + -1,-1 1 m_thicknessCtrl 1 @@ -467,69 +477,58 @@ 5 wxEXPAND|wxTOP|wxBOTTOM 0 - + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 - bLineMargins - wxVERTICAL - none - - 5 - wxEXPAND | wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline2 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - ; forward_declare - 0 - - - - - - + 1 + m_staticline2 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + ; forward_declare + 0 + + + + diff --git a/pcbnew/dialogs/panel_setup_layers_base.h b/pcbnew/dialogs/panel_setup_layers_base.h index e966686e39..937632bf2d 100644 --- a/pcbnew/dialogs/panel_setup_layers_base.h +++ b/pcbnew/dialogs/panel_setup_layers_base.h @@ -352,7 +352,7 @@ class PANEL_SETUP_LAYERS_BASE : public wxPanel public: - PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 585,545 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); + PANEL_SETUP_LAYERS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 621,545 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); ~PANEL_SETUP_LAYERS_BASE(); };