From 6964a4b6df2292baf4f755b175ca17fb86b9bda5 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 11 Dec 2010 21:57:25 +0100 Subject: [PATCH] UI policy fixes --- pcbnew/dialogs/dialog_plot_base.cpp | 25 ++++++++++---------- pcbnew/dialogs/dialog_plot_base.fbp | 36 ++++++++++++++--------------- pcbnew/dialogs/dialog_plot_base.h | 2 +- 3 files changed, 31 insertions(+), 32 deletions(-) diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp index 95ebfa6688..f1248fde33 100644 --- a/pcbnew/dialogs/dialog_plot_base.cpp +++ b/pcbnew/dialogs/dialog_plot_base.cpp @@ -79,11 +79,11 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr wxBoxSizer* bPlotOptionsSizer; bPlotOptionsSizer = new wxBoxSizer( wxVERTICAL ); - wxString m_drillShapeOptChoices[] = { _("No drill mark"), _("Small mark"), _("Real drill") }; + wxString m_drillShapeOptChoices[] = { _("No drill mark"), _("Small mark"), _("Actual hole") }; int m_drillShapeOptNChoices = sizeof( m_drillShapeOptChoices ) / sizeof( wxString ); - m_drillShapeOpt = new wxRadioBox( this, wxID_ANY, _("Pads Drill Opt"), wxDefaultPosition, wxDefaultSize, m_drillShapeOptNChoices, m_drillShapeOptChoices, 1, wxRA_SPECIFY_COLS ); - m_drillShapeOpt->SetSelection( 1 ); - bPlotOptionsSizer->Add( m_drillShapeOpt, 0, wxEXPAND|wxALL, 5 ); + m_drillShapeOpt = new wxRadioBox( this, wxID_ANY, _("Holes Options"), wxDefaultPosition, wxDefaultSize, m_drillShapeOptNChoices, m_drillShapeOptChoices, 1, wxRA_SPECIFY_COLS ); + m_drillShapeOpt->SetSelection( 2 ); + bPlotOptionsSizer->Add( m_drillShapeOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); wxString m_scaleOptChoices[] = { _("Auto scale"), _("Scale 1"), _("Scale 1.5"), _("Scale 2"), _("Scale 3") }; int m_scaleOptNChoices = sizeof( m_scaleOptChoices ) / sizeof( wxString ); @@ -103,16 +103,16 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_choicePlotOffset->SetSelection( 0 ); bPlotOptionsSizer->Add( m_choicePlotOffset, 0, wxALL|wxEXPAND, 5 ); - bUpperSizer->Add( bPlotOptionsSizer, 1, 0, 5 ); + bUpperSizer->Add( bPlotOptionsSizer, 0, wxEXPAND, 5 ); wxBoxSizer* bSizerFmtPlot; bSizerFmtPlot = new wxBoxSizer( wxVERTICAL ); - wxString m_plotFormatOptChoices[] = { _("HPGL"), _("Gerber"), _("Postscript"), _("Postscript A4"), _("DXF Export") }; + wxString m_plotFormatOptChoices[] = { _("HPGL"), _("Gerber"), _("Postscript"), _("Postscript A4"), _("DXF export") }; int m_plotFormatOptNChoices = sizeof( m_plotFormatOptChoices ) / sizeof( wxString ); m_plotFormatOpt = new wxRadioBox( this, wxID_ANY, _("Plot Format"), wxDefaultPosition, wxDefaultSize, m_plotFormatOptNChoices, m_plotFormatOptChoices, 1, wxRA_SPECIFY_COLS ); - m_plotFormatOpt->SetSelection( 1 ); - bSizerFmtPlot->Add( m_plotFormatOpt, 0, wxALL|wxEXPAND, 5 ); + m_plotFormatOpt->SetSelection( 4 ); + bSizerFmtPlot->Add( m_plotFormatOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); wxStaticBoxSizer* m_HPGL_OptionsBox; m_HPGL_OptionsBox = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("HPGL Options:") ), wxVERTICAL ); @@ -144,7 +144,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr bSizerFmtPlot->Add( m_HPGL_OptionsBox, 0, wxEXPAND, 5 ); - bUpperSizer->Add( bSizerFmtPlot, 1, 0, 5 ); + bUpperSizer->Add( bSizerFmtPlot, 0, wxEXPAND, 5 ); wxBoxSizer* bButtonsSizer; bButtonsSizer = new wxBoxSizer( wxVERTICAL ); @@ -163,7 +163,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr sbSizerPlotOpt->Add( m_plotNoViaOnMaskOpt, 0, wxALL, 5 ); - bButtonsSizer->Add( sbSizerPlotOpt, 0, wxEXPAND|wxALL, 5 ); + bButtonsSizer->Add( sbSizerPlotOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_staticText6 = new wxStaticText( this, wxID_ANY, _("Default pen size"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText6->Wrap( -1 ); @@ -209,7 +209,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Quit"), wxDefaultPosition, wxDefaultSize, 0 ); bButtonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - bUpperSizer->Add( bButtonsSizer, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + bUpperSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 ); @@ -229,7 +229,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_browseButton = new wxButton( this, wxID_ANY, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); bSizerDirNmae->Add( m_browseButton, 0, wxRIGHT|wxLEFT, 5 ); - bSizerDirChoice->Add( bSizerDirNmae, 1, wxEXPAND|wxRIGHT, 5 ); + bSizerDirChoice->Add( bSizerDirNmae, 0, wxRIGHT|wxEXPAND, 5 ); bMainSizer->Add( bSizerDirChoice, 0, wxEXPAND, 5 ); @@ -244,7 +244,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr this->SetSizer( bMainSizer ); this->Layout(); - bMainSizer->Fit( this ); // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_BASE::OnCloseWindow ) ); diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp index d7ae192a56..44c1c30a11 100644 --- a/pcbnew/dialogs/dialog_plot_base.fbp +++ b/pcbnew/dialogs/dialog_plot_base.fbp @@ -37,7 +37,7 @@ -1,350 DIALOG_PLOT_BASE - -1,-1 + 571,616 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER Plot @@ -661,8 +661,8 @@ 5 - - 1 + wxEXPAND + 0 bPlotOptionsSizer @@ -670,11 +670,11 @@ none 5 - wxEXPAND|wxALL + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 - "No drill mark" "Small mark" "Real drill" + "No drill mark" "Small mark" "Actual hole" 1 1 @@ -682,14 +682,14 @@ 0 wxID_ANY - Pads Drill Opt + Holes Options 1 m_drillShapeOpt protected - 1 + 2 wxRA_SPECIFY_COLS @@ -908,8 +908,8 @@ 5 - - 1 + wxEXPAND + 0 bSizerFmtPlot @@ -917,11 +917,11 @@ none 5 - wxALL|wxEXPAND + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 - "HPGL" "Gerber" "Postscript" "Postscript A4" "DXF Export" + "HPGL" "Gerber" "Postscript" "Postscript A4" "DXF export" 1 1 @@ -936,7 +936,7 @@ m_plotFormatOpt protected - 1 + 4 wxRA_SPECIFY_COLS @@ -1338,18 +1338,18 @@ - + 5 wxALIGN_CENTER_VERTICAL|wxEXPAND - 1 - + 0 + bButtonsSizer wxVERTICAL none 5 - wxEXPAND|wxALL + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 wxID_ANY @@ -2199,8 +2199,8 @@ 5 - wxEXPAND|wxRIGHT - 1 + wxRIGHT|wxEXPAND + 0 bSizerDirNmae diff --git a/pcbnew/dialogs/dialog_plot_base.h b/pcbnew/dialogs/dialog_plot_base.h index 8be7c78f79..c30ae90bb0 100644 --- a/pcbnew/dialogs/dialog_plot_base.h +++ b/pcbnew/dialogs/dialog_plot_base.h @@ -99,7 +99,7 @@ class DIALOG_PLOT_BASE : public wxDialog public: - DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 571,616 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_PLOT_BASE(); };