diff --git a/3d-viewer/dialogs/panel_preview_3d_model.cpp b/3d-viewer/dialogs/panel_preview_3d_model.cpp index 5bfec8d492..5a9f5dc690 100644 --- a/3d-viewer/dialogs/panel_preview_3d_model.cpp +++ b/3d-viewer/dialogs/panel_preview_3d_model.cpp @@ -25,6 +25,7 @@ */ #include "panel_preview_3d_model.h" +#include #include <3d_canvas/eda_3d_canvas.h> #include #include @@ -46,14 +47,14 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM FOOTPRINT* aFootprint, std::vector* aParentModelList ) : PANEL_PREVIEW_3D_MODEL_BASE( aParent, wxID_ANY ), + m_parentFrame( aFrame ), m_previewPane( nullptr ), m_infobar( nullptr ), m_boardAdapter(), m_currentCamera( m_trackBallCamera ), - m_trackBallCamera( 2 * RANGE_SCALE_3D ), - m_boardThickness( aFrame, nullptr, m_boardThicknessCtrl, m_boardThicknessUnits ) + m_trackBallCamera( 2 * RANGE_SCALE_3D ) { - m_userUnits = aFrame->GetUserUnits(); + m_userUnits = m_parentFrame->GetUserUnits(); m_dummyBoard = new BOARD(); @@ -83,6 +84,7 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM m_bpvBottom->SetBitmap( KiBitmap( BITMAPS::axis3d_bottom ) ); m_bpvISO->SetBitmap( KiBitmap( BITMAPS::ortho ) ); m_bpUpdate->SetBitmap( KiBitmap( BITMAPS::reload ) ); + m_bpSettings->SetBitmap( KiBitmap( BITMAPS::options_3drender ) ); // Set the min and max values of spin buttons (mandatory on Linux) // They are not used, so they are set to min and max 32 bits int values @@ -165,6 +167,7 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM m_bpvBottom->SetMinSize( m_bpvBottom->GetSize() + borderFix ); m_bpvISO->SetMinSize( m_bpvISO->GetSize() + borderFix ); m_bpUpdate->SetMinSize( m_bpUpdate->GetSize() + borderFix ); + m_bpSettings->SetMinSize( m_bpSettings->GetSize() + borderFix ); #endif } @@ -328,9 +331,6 @@ void PANEL_PREVIEW_3D_MODEL::SetSelectedModel( int idx ) m_opacity->SetValue( 100 ); } - - BOARD_DESIGN_SETTINGS dummy_bds = m_dummyBoard->GetDesignSettings(); - m_boardThickness.ChangeValue( dummy_bds.GetBoardThickness() ); } @@ -383,16 +383,27 @@ void PANEL_PREVIEW_3D_MODEL::onOpacitySlider( wxCommandEvent& event ) } -void PANEL_PREVIEW_3D_MODEL::updateBoardThickness( wxCommandEvent& event ) +void PANEL_PREVIEW_3D_MODEL::View3DSettings( wxCommandEvent& event ) { - BOARD_DESIGN_SETTINGS dummy_bds = m_dummyBoard->GetDesignSettings(); - dummy_bds.SetBoardThickness( m_boardThickness.GetValue() ); + BOARD_DESIGN_SETTINGS bds = m_dummyBoard->GetDesignSettings(); + int thickness = bds.GetBoardThickness(); - BOARD_STACKUP& dummy_board_stackup = m_dummyBoard->GetDesignSettings().GetStackupDescriptor(); - dummy_board_stackup.RemoveAll(); - dummy_board_stackup.BuildDefaultStackupList( &dummy_bds, 2 ); + WX_UNIT_ENTRY_DIALOG dlg( m_parentFrame, _( "Board thickness:" ), + _( "3D Preview Options" ), thickness ); + + if( dlg.ShowModal() != wxID_OK ) + return; + + bds.SetBoardThickness( (int) dlg.GetValue() ); + + BOARD_STACKUP& boardStackup = m_dummyBoard->GetDesignSettings().GetStackupDescriptor(); + boardStackup.RemoveAll(); + boardStackup.BuildDefaultStackupList( &bds, 2 ); UpdateDummyFootprint( true ); + + m_previewPane->ReloadRequest(); + m_previewPane->Refresh(); } diff --git a/3d-viewer/dialogs/panel_preview_3d_model.h b/3d-viewer/dialogs/panel_preview_3d_model.h index e589a0166c..d5da6b1b97 100644 --- a/3d-viewer/dialogs/panel_preview_3d_model.h +++ b/3d-viewer/dialogs/panel_preview_3d_model.h @@ -135,8 +135,6 @@ private: void onOpacitySlider( wxCommandEvent& event ) override; - void updateBoardThickness( wxCommandEvent& event ) override; - void doIncrementScale( wxSpinEvent& aEvent, double aSign ); void doIncrementRotation( wxSpinEvent& aEvent, double aSign ); void doIncrementOffset( wxSpinEvent& aEvent, double aSign ); @@ -174,6 +172,8 @@ private: m_previewPane->Refresh(); } + void View3DSettings( wxCommandEvent& event ) override; + void View3DRight( wxCommandEvent& event ) override { m_previewPane->SetView3D( VIEW3D_TYPE::VIEW3D_RIGHT ); @@ -190,6 +190,7 @@ private: } private: + PCB_BASE_FRAME* m_parentFrame; EDA_3D_CANVAS* m_previewPane; WX_INFOBAR* m_infobar; BOARD_ADAPTER m_boardAdapter; @@ -202,7 +203,6 @@ private: std::vector* m_parentModelList; int m_selected; /// Index into m_parentInfoList - UNIT_BINDER m_boardThickness; EDA_UNITS m_userUnits; }; diff --git a/3d-viewer/dialogs/panel_preview_3d_model_base.cpp b/3d-viewer/dialogs/panel_preview_3d_model_base.cpp index e9530245f0..ff25410b62 100644 --- a/3d-viewer/dialogs/panel_preview_3d_model_base.cpp +++ b/3d-viewer/dialogs/panel_preview_3d_model_base.cpp @@ -21,7 +21,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi sbSizerScale = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scale") ), wxVERTICAL ); wxFlexGridSizer* fgSizerScale; - fgSizerScale = new wxFlexGridSizer( 0, 3, 3, 3 ); + fgSizerScale = new wxFlexGridSizer( 0, 3, 2, 3 ); fgSizerScale->AddGrowableCol( 1 ); fgSizerScale->SetFlexibleDirection( wxBOTH ); fgSizerScale->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); @@ -66,7 +66,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi sbSizerRotation = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Rotation") ), wxVERTICAL ); wxFlexGridSizer* fgSizerRotate; - fgSizerRotate = new wxFlexGridSizer( 0, 3, 3, 3 ); + fgSizerRotate = new wxFlexGridSizer( 0, 3, 2, 3 ); fgSizerRotate->AddGrowableCol( 1 ); fgSizerRotate->SetFlexibleDirection( wxBOTH ); fgSizerRotate->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); @@ -111,7 +111,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi sbSizerOffset = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Offset") ), wxVERTICAL ); wxFlexGridSizer* fgSizerOffset; - fgSizerOffset = new wxFlexGridSizer( 0, 3, 3, 3 ); + fgSizerOffset = new wxFlexGridSizer( 0, 3, 2, 3 ); fgSizerOffset->AddGrowableCol( 1 ); fgSizerOffset->SetFlexibleDirection( wxBOTH ); fgSizerOffset->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); @@ -159,20 +159,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi sbSizer4->Add( m_opacity, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - bSizerLeft->Add( sbSizer4, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - wxStaticBoxSizer* sbSizerBoardThickness; - sbSizerBoardThickness = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Board Thickness") ), wxHORIZONTAL ); - - m_boardThicknessCtrl = new wxTextCtrl( sbSizerBoardThickness->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - sbSizerBoardThickness->Add( m_boardThicknessCtrl, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); - - m_boardThicknessUnits = new wxStaticText( sbSizerBoardThickness->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); - m_boardThicknessUnits->Wrap( -1 ); - sbSizerBoardThickness->Add( m_boardThicknessUnits, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizerLeft->Add( sbSizerBoardThickness, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + bSizerLeft->Add( sbSizer4, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizermain->Add( bSizerLeft, 0, 0, 5 ); @@ -195,7 +182,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi m_SizerPanelView = new wxBoxSizer( wxVERTICAL ); - bSizerRight->Add( m_SizerPanelView, 1, wxEXPAND|wxBOTTOM, 8 ); + bSizerRight->Add( m_SizerPanelView, 1, wxEXPAND|wxBOTTOM, 5 ); bSizermain->Add( bSizerRight, 1, wxRIGHT|wxLEFT|wxEXPAND, 5 ); @@ -212,7 +199,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 ); m_bpvLeft = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); - bSizer3DButtons->Add( m_bpvLeft, 0, wxALIGN_LEFT|wxALIGN_RIGHT|wxBOTTOM, 5 ); + bSizer3DButtons->Add( m_bpvLeft, 0, wxBOTTOM, 5 ); m_bpvRight = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); bSizer3DButtons->Add( m_bpvRight, 0, wxBOTTOM, 5 ); @@ -237,6 +224,9 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi bSizer3DButtons->Add( m_bpUpdate, 0, wxBOTTOM, 5 ); + m_bpSettings = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + bSizer3DButtons->Add( m_bpSettings, 0, 0, 5 ); + bSizermain->Add( bSizer3DButtons, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); @@ -283,8 +273,6 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi m_spinZoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this ); m_spinZoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this ); m_opacity->Connect( wxEVT_SLIDER, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onOpacitySlider ), NULL, this ); - m_boardThicknessCtrl->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelBoardThickness ), NULL, this ); - m_boardThicknessCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateBoardThickness ), NULL, this ); m_bpvISO->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DISO ), NULL, this ); m_bpvLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DLeft ), NULL, this ); m_bpvRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DRight ), NULL, this ); @@ -293,6 +281,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi m_bpvTop->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DTop ), NULL, this ); m_bpvBottom->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DBottom ), NULL, this ); m_bpUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DUpdate ), NULL, this ); + m_bpSettings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DSettings ), NULL, this ); } PANEL_PREVIEW_3D_MODEL_BASE::~PANEL_PREVIEW_3D_MODEL_BASE() @@ -335,8 +324,6 @@ PANEL_PREVIEW_3D_MODEL_BASE::~PANEL_PREVIEW_3D_MODEL_BASE() m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this ); m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this ); m_opacity->Disconnect( wxEVT_SLIDER, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onOpacitySlider ), NULL, this ); - m_boardThicknessCtrl->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelBoardThickness ), NULL, this ); - m_boardThicknessCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateBoardThickness ), NULL, this ); m_bpvISO->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DISO ), NULL, this ); m_bpvLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DLeft ), NULL, this ); m_bpvRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DRight ), NULL, this ); @@ -345,5 +332,6 @@ PANEL_PREVIEW_3D_MODEL_BASE::~PANEL_PREVIEW_3D_MODEL_BASE() m_bpvTop->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DTop ), NULL, this ); m_bpvBottom->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DBottom ), NULL, this ); m_bpUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DUpdate ), NULL, this ); + m_bpSettings->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DSettings ), NULL, this ); } diff --git a/3d-viewer/dialogs/panel_preview_3d_model_base.fbp b/3d-viewer/dialogs/panel_preview_3d_model_base.fbp index 8b1d56465a..21d72e2ec8 100644 --- a/3d-viewer/dialogs/panel_preview_3d_model_base.fbp +++ b/3d-viewer/dialogs/panel_preview_3d_model_base.fbp @@ -93,7 +93,7 @@ wxFLEX_GROWMODE_SPECIFIED none 0 - 3 + 2 5 wxALIGN_CENTER_VERTICAL|wxLEFT @@ -686,7 +686,7 @@ wxFLEX_GROWMODE_SPECIFIED none 0 - 3 + 2 5 wxALIGN_CENTER_VERTICAL|wxLEFT @@ -1279,7 +1279,7 @@ wxFLEX_GROWMODE_SPECIFIED none 0 - 3 + 2 5 wxALIGN_CENTER_VERTICAL|wxLEFT @@ -1847,7 +1847,7 @@ 5 - wxEXPAND|wxLEFT|wxRIGHT + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 1 wxID_ANY @@ -1925,147 +1925,6 @@ - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - wxID_ANY - Board Thickness - - sbSizerBoardThickness - wxHORIZONTAL - 1 - none - - 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_boardThicknessCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - onMouseWheelBoardThickness - updateBoardThickness - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - mm - 0 - - 0 - - - 0 - - 1 - m_boardThicknessUnits - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - @@ -2150,7 +2009,7 @@ - 8 + 5 wxEXPAND|wxBOTTOM 1 @@ -2257,7 +2116,7 @@ 5 - wxALIGN_LEFT|wxALIGN_RIGHT|wxBOTTOM + wxBOTTOM 0 1 @@ -2783,6 +2642,80 @@ View3DUpdate + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + MyButton + + 0 + + 0 + + + 0 + + 1 + m_bpSettings + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + View3DSettings + + diff --git a/3d-viewer/dialogs/panel_preview_3d_model_base.h b/3d-viewer/dialogs/panel_preview_3d_model_base.h index d2c1c0f6b0..1619ce5672 100644 --- a/3d-viewer/dialogs/panel_preview_3d_model_base.h +++ b/3d-viewer/dialogs/panel_preview_3d_model_base.h @@ -66,8 +66,6 @@ class PANEL_PREVIEW_3D_MODEL_BASE : public wxPanel wxTextCtrl* zoff; wxSpinButton* m_spinZoffset; wxSlider* m_opacity; - wxTextCtrl* m_boardThicknessCtrl; - wxStaticText* m_boardThicknessUnits; wxStaticText* m_previewLabel; wxBoxSizer* m_SizerPanelView; wxBitmapButton* m_bpvISO; @@ -78,6 +76,7 @@ class PANEL_PREVIEW_3D_MODEL_BASE : public wxPanel wxBitmapButton* m_bpvTop; wxBitmapButton* m_bpvBottom; wxBitmapButton* m_bpUpdate; + wxBitmapButton* m_bpSettings; // Virtual event handlers, override them in your derived class virtual void onMouseWheelScale( wxMouseEvent& event ) { event.Skip(); } @@ -91,8 +90,6 @@ class PANEL_PREVIEW_3D_MODEL_BASE : public wxPanel virtual void onDecrementOffset( wxSpinEvent& event ) { event.Skip(); } virtual void onIncrementOffset( wxSpinEvent& event ) { event.Skip(); } virtual void onOpacitySlider( wxCommandEvent& event ) { event.Skip(); } - virtual void onMouseWheelBoardThickness( wxMouseEvent& event ) { event.Skip(); } - virtual void updateBoardThickness( wxCommandEvent& event ) { event.Skip(); } virtual void View3DISO( wxCommandEvent& event ) { event.Skip(); } virtual void View3DLeft( wxCommandEvent& event ) { event.Skip(); } virtual void View3DRight( wxCommandEvent& event ) { event.Skip(); } @@ -101,6 +98,7 @@ class PANEL_PREVIEW_3D_MODEL_BASE : public wxPanel virtual void View3DTop( wxCommandEvent& event ) { event.Skip(); } virtual void View3DBottom( wxCommandEvent& event ) { event.Skip(); } virtual void View3DUpdate( wxCommandEvent& event ) { event.Skip(); } + virtual void View3DSettings( wxCommandEvent& event ) { event.Skip(); } public: diff --git a/pcbnew/dialogs/dialog_footprint_properties_base.cpp b/pcbnew/dialogs/dialog_footprint_properties_base.cpp index 5e33495d70..1fb7c5ecd8 100644 --- a/pcbnew/dialogs/dialog_footprint_properties_base.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties_base.cpp @@ -106,7 +106,7 @@ DIALOG_FOOTPRINT_PROPERTIES_BASE::DIALOG_FOOTPRINT_PROPERTIES_BASE( wxWindow* pa sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Position") ), wxVERTICAL ); wxFlexGridSizer* fgSizerPos; - fgSizerPos = new wxFlexGridSizer( 4, 3, 3, 0 ); + fgSizerPos = new wxFlexGridSizer( 4, 3, 2, 0 ); fgSizerPos->AddGrowableCol( 1 ); fgSizerPos->AddGrowableRow( 2 ); fgSizerPos->SetFlexibleDirection( wxBOTH ); @@ -143,7 +143,7 @@ DIALOG_FOOTPRINT_PROPERTIES_BASE::DIALOG_FOOTPRINT_PROPERTIES_BASE( wxWindow* pa m_orientationCtrl->Append( _("90") ); m_orientationCtrl->Append( _("-90") ); m_orientationCtrl->Append( _("180") ); - fgSizerPos->Add( m_orientationCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 ); + fgSizerPos->Add( m_orientationCtrl, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2 ); fgSizerPos->Add( 0, 0, 1, wxEXPAND, 5 ); @@ -156,7 +156,7 @@ DIALOG_FOOTPRINT_PROPERTIES_BASE::DIALOG_FOOTPRINT_PROPERTIES_BASE( wxWindow* pa int m_BoardSideCtrlNChoices = sizeof( m_BoardSideCtrlChoices ) / sizeof( wxString ); m_BoardSideCtrl = new wxChoice( sbSizer7->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_BoardSideCtrlNChoices, m_BoardSideCtrlChoices, 0 ); m_BoardSideCtrl->SetSelection( 1 ); - fgSizerPos->Add( m_BoardSideCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + fgSizerPos->Add( m_BoardSideCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM, 2 ); sbSizer7->Add( fgSizerPos, 0, wxEXPAND|wxBOTTOM, 3 ); diff --git a/pcbnew/dialogs/dialog_footprint_properties_base.fbp b/pcbnew/dialogs/dialog_footprint_properties_base.fbp index 4b8409bdea..a5e8286dee 100644 --- a/pcbnew/dialogs/dialog_footprint_properties_base.fbp +++ b/pcbnew/dialogs/dialog_footprint_properties_base.fbp @@ -498,7 +498,7 @@ wxFLEX_GROWMODE_SPECIFIED none 4 - 3 + 2 5 wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT @@ -933,8 +933,8 @@ - 5 - wxALIGN_CENTER_VERTICAL + 2 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM 0 1 @@ -1069,8 +1069,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND + 2 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM 0 1