From 31b026c70f6583c2d2a36e53ef415ff4e32edc98 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 8 May 2018 20:01:29 +0100 Subject: [PATCH] Another attempt to fix the initial button layout on GTK. --- pcbnew/dialogs/dialog_plot.cpp | 4 ++-- pcbnew/dialogs/dialog_plot_base.cpp | 11 +++++------ pcbnew/dialogs/dialog_plot_base.fbp | 4 ++-- pcbnew/dialogs/dialog_plot_base.h | 1 + 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index 3d02edfcae..8f5734d218 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -53,10 +53,10 @@ DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aParent ) : init_Dialog(); // We use a sdbSizer here to get the order right, which is platform-dependent - m_sdbSizer1OK->SetLabel( _( " Plot " ) ); + m_sdbSizer1OK->SetLabel( _( "Plot" ) ); m_sdbSizer1Apply->SetLabel( _( "Generate Drill Files..." ) ); m_sdbSizer1Cancel->SetLabel( _( "Close" ) ); - m_sdbSizer1->Layout(); + m_sizerButtons->Layout(); m_sdbSizer1OK->SetDefault(); diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp index 20d26beddf..e6f3b4e6d0 100644 --- a/pcbnew/dialogs/dialog_plot_base.cpp +++ b/pcbnew/dialogs/dialog_plot_base.cpp @@ -376,14 +376,13 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_MainSizer->Add( sbSizerMsg, 1, wxEXPAND, 5 ); - wxBoxSizer* bSizerButtons; - bSizerButtons = new wxBoxSizer( wxHORIZONTAL ); + m_sizerButtons = new wxBoxSizer( wxHORIZONTAL ); m_buttonDRC = new wxButton( this, wxID_ANY, _("Run DRC..."), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerButtons->Add( m_buttonDRC, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_sizerButtons->Add( m_buttonDRC, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - bSizerButtons->Add( 10, 0, 1, wxEXPAND, 5 ); + m_sizerButtons->Add( 10, 0, 1, wxEXPAND, 5 ); m_sdbSizer1 = new wxStdDialogButtonSizer(); m_sdbSizer1OK = new wxButton( this, wxID_OK ); @@ -394,10 +393,10 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); m_sdbSizer1->Realize(); - bSizerButtons->Add( m_sdbSizer1, 0, wxEXPAND, 5 ); + m_sizerButtons->Add( m_sdbSizer1, 0, wxEXPAND, 5 ); - m_MainSizer->Add( bSizerButtons, 0, wxALIGN_RIGHT|wxEXPAND|wxLEFT, 5 ); + m_MainSizer->Add( m_sizerButtons, 0, wxALIGN_RIGHT|wxEXPAND|wxLEFT, 5 ); this->SetSizer( m_MainSizer ); diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp index 1373122591..4ff47b2050 100644 --- a/pcbnew/dialogs/dialog_plot_base.fbp +++ b/pcbnew/dialogs/dialog_plot_base.fbp @@ -4482,9 +4482,9 @@ 0 - bSizerButtons + m_sizerButtons wxHORIZONTAL - none + protected 5 wxALIGN_CENTER_VERTICAL|wxALL diff --git a/pcbnew/dialogs/dialog_plot_base.h b/pcbnew/dialogs/dialog_plot_base.h index 33889cf6b3..ae578b4d3d 100644 --- a/pcbnew/dialogs/dialog_plot_base.h +++ b/pcbnew/dialogs/dialog_plot_base.h @@ -113,6 +113,7 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM wxCheckBox* m_DXF_plotModeOpt; wxCheckBox* m_DXF_plotTextStrokeFontOpt; WX_HTML_REPORT_PANEL* m_messagesPanel; + wxBoxSizer* m_sizerButtons; wxButton* m_buttonDRC; wxStdDialogButtonSizer* m_sdbSizer1; wxButton* m_sdbSizer1OK;