From 4541eb4f37a3db65698296bb3896ab8cb0c0335d Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Fri, 11 Sep 2015 10:31:45 -0400 Subject: [PATCH] Pcbnew: minor graphic items properties dialog improvements. * Use colons for consistency with other dialogs. * Use default size to allow sizers to determine dialog size. * Use "segment" rather than abbreviation "segm". * Use width and height to describe text instead of X and Y. * Add spacer to improve layout when resizing dialog. --- .../dialog_graphic_items_options_base.cpp | 26 ++++++++------ .../dialog_graphic_items_options_base.fbp | 34 ++++++++++++------- .../dialog_graphic_items_options_base.h | 4 +-- 3 files changed, 39 insertions(+), 25 deletions(-) diff --git a/pcbnew/dialogs/dialog_graphic_items_options_base.cpp b/pcbnew/dialogs/dialog_graphic_items_options_base.cpp index 4f18597447..1ca2a7572f 100644 --- a/pcbnew/dialogs/dialog_graphic_items_options_base.cpp +++ b/pcbnew/dialogs/dialog_graphic_items_options_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 9 2015) +// C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -22,7 +22,7 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* wxStaticBoxSizer* sbSizerLeft; sbSizerLeft = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Graphics:") ), wxVERTICAL ); - m_GraphicSegmWidthTitle = new wxStaticText( this, wxID_ANY, _("Graphic segm Width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_GraphicSegmWidthTitle = new wxStaticText( this, wxID_ANY, _("Graphic segment width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_GraphicSegmWidthTitle->Wrap( -1 ); sbSizerLeft->Add( m_GraphicSegmWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); @@ -30,7 +30,7 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* m_OptPcbSegmWidth->SetMaxLength( 0 ); sbSizerLeft->Add( m_OptPcbSegmWidth, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_BoardEdgesWidthTitle = new wxStaticText( this, wxID_ANY, _("Board Edges Width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_BoardEdgesWidthTitle = new wxStaticText( this, wxID_ANY, _("Board edge width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_BoardEdgesWidthTitle->Wrap( -1 ); sbSizerLeft->Add( m_BoardEdgesWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); @@ -38,7 +38,7 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* m_OptPcbEdgesWidth->SetMaxLength( 0 ); sbSizerLeft->Add( m_OptPcbEdgesWidth, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_CopperTextWidthTitle = new wxStaticText( this, wxID_ANY, _("Copper Text Width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_CopperTextWidthTitle = new wxStaticText( this, wxID_ANY, _("Copper text thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); m_CopperTextWidthTitle->Wrap( -1 ); sbSizerLeft->Add( m_CopperTextWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); @@ -46,7 +46,7 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* m_OptPcbTextWidth->SetMaxLength( 0 ); sbSizerLeft->Add( m_OptPcbTextWidth, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_TextSizeVTitle = new wxStaticText( this, wxID_ANY, _("Text Size V"), wxDefaultPosition, wxDefaultSize, 0 ); + m_TextSizeVTitle = new wxStaticText( this, wxID_ANY, _("Text height:"), wxDefaultPosition, wxDefaultSize, 0 ); m_TextSizeVTitle->Wrap( -1 ); sbSizerLeft->Add( m_TextSizeVTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); @@ -54,7 +54,7 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* m_OptPcbTextVSize->SetMaxLength( 0 ); sbSizerLeft->Add( m_OptPcbTextVSize, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_TextSizeHTitle = new wxStaticText( this, wxID_ANY, _("Text Size H"), wxDefaultPosition, wxDefaultSize, 0 ); + m_TextSizeHTitle = new wxStaticText( this, wxID_ANY, _("Text width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_TextSizeHTitle->Wrap( -1 ); sbSizerLeft->Add( m_TextSizeHTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); @@ -68,7 +68,7 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* wxStaticBoxSizer* sbSizerMiddle; sbSizerMiddle = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprints:") ), wxVERTICAL ); - m_EdgeModWidthTitle = new wxStaticText( this, wxID_ANY, _("Edges Width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_EdgeModWidthTitle = new wxStaticText( this, wxID_ANY, _("Edge width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_EdgeModWidthTitle->Wrap( -1 ); sbSizerMiddle->Add( m_EdgeModWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); @@ -76,7 +76,7 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* m_OptModuleEdgesWidth->SetMaxLength( 0 ); sbSizerMiddle->Add( m_OptModuleEdgesWidth, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_TextModWidthTitle = new wxStaticText( this, wxID_ANY, _("Text Width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_TextModWidthTitle = new wxStaticText( this, wxID_ANY, _("Text thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); m_TextModWidthTitle->Wrap( -1 ); sbSizerMiddle->Add( m_TextModWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); @@ -84,7 +84,7 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* m_OptModuleTextWidth->SetMaxLength( 0 ); sbSizerMiddle->Add( m_OptModuleTextWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - m_TextModSizeVTitle = new wxStaticText( this, wxID_ANY, _("Text Size V"), wxDefaultPosition, wxDefaultSize, 0 ); + m_TextModSizeVTitle = new wxStaticText( this, wxID_ANY, _("Text height:"), wxDefaultPosition, wxDefaultSize, 0 ); m_TextModSizeVTitle->Wrap( -1 ); sbSizerMiddle->Add( m_TextModSizeVTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); @@ -92,7 +92,7 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* m_OptModuleTextVSize->SetMaxLength( 0 ); sbSizerMiddle->Add( m_OptModuleTextVSize, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - m_TextModSizeHTitle = new wxStaticText( this, wxID_ANY, _("Text Size H"), wxDefaultPosition, wxDefaultSize, 0 ); + m_TextModSizeHTitle = new wxStaticText( this, wxID_ANY, _("Text width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_TextModSizeHTitle->Wrap( -1 ); sbSizerMiddle->Add( m_TextModSizeHTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); @@ -106,7 +106,7 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* wxStaticBoxSizer* sbSizerRight; sbSizerRight = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("General:") ), wxVERTICAL ); - m_DefaultPenSizeTitle = new wxStaticText( this, wxID_ANY, _("Default pen size"), wxDefaultPosition, wxDefaultSize, 0 ); + m_DefaultPenSizeTitle = new wxStaticText( this, wxID_ANY, _("Default pen size:"), wxDefaultPosition, wxDefaultSize, 0 ); m_DefaultPenSizeTitle->Wrap( -1 ); m_DefaultPenSizeTitle->SetToolTip( _("Pen size used to draw items that have no pen size specified.\nUsed mainly to draw items in sketch mode.") ); @@ -122,6 +122,9 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 ); + + bSizerMain->Add( 0, 0, 0, wxEXPAND, 5 ); + m_sdbSizer1 = new wxStdDialogButtonSizer(); m_sdbSizer1OK = new wxButton( this, wxID_OK ); m_sdbSizer1->AddButton( m_sdbSizer1OK ); @@ -134,6 +137,7 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* this->SetSizer( bSizerMain ); this->Layout(); + bSizerMain->Fit( this ); // Connect Events m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE::OnCancelClick ), NULL, this ); diff --git a/pcbnew/dialogs/dialog_graphic_items_options_base.fbp b/pcbnew/dialogs/dialog_graphic_items_options_base.fbp index f81f3d0e80..27912d4bce 100644 --- a/pcbnew/dialogs/dialog_graphic_items_options_base.fbp +++ b/pcbnew/dialogs/dialog_graphic_items_options_base.fbp @@ -44,10 +44,10 @@ DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE - 459,345 + -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h - Texts and Drawings + Text and Drawings @@ -146,7 +146,7 @@ 0 0 wxID_ANY - Graphic segm Width + Graphic segment width: 0 @@ -320,7 +320,7 @@ 0 0 wxID_ANY - Board Edges Width + Board edge width: 0 @@ -494,7 +494,7 @@ 0 0 wxID_ANY - Copper Text Width + Copper text thickness: 0 @@ -668,7 +668,7 @@ 0 0 wxID_ANY - Text Size V + Text height: 0 @@ -842,7 +842,7 @@ 0 0 wxID_ANY - Text Size H + Text width: 0 @@ -1030,7 +1030,7 @@ 0 0 wxID_ANY - Edges Width + Edge width: 0 @@ -1204,7 +1204,7 @@ 0 0 wxID_ANY - Text Width + Text thickness: 0 @@ -1378,7 +1378,7 @@ 0 0 wxID_ANY - Text Size V + Text height: 0 @@ -1552,7 +1552,7 @@ 0 0 wxID_ANY - Text Size H + Text width: 0 @@ -1740,7 +1740,7 @@ 0 0 wxID_ANY - Default pen size + Default pen size: 0 @@ -1886,6 +1886,16 @@ + + 5 + wxEXPAND + 0 + + 0 + protected + 0 + + 5 wxEXPAND|wxTOP|wxBOTTOM diff --git a/pcbnew/dialogs/dialog_graphic_items_options_base.h b/pcbnew/dialogs/dialog_graphic_items_options_base.h index 7a672c0af4..990b63c491 100644 --- a/pcbnew/dialogs/dialog_graphic_items_options_base.h +++ b/pcbnew/dialogs/dialog_graphic_items_options_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 9 2015) +// C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -68,7 +68,7 @@ class DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE : public DIALOG_SHIM public: - DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Texts and Drawings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 459,345 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text and Drawings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE(); };