diff --git a/pcbnew/dialogs/dialog_text_properties.cpp b/pcbnew/dialogs/dialog_text_properties.cpp index 394becabbb..86af789312 100644 --- a/pcbnew/dialogs/dialog_text_properties.cpp +++ b/pcbnew/dialogs/dialog_text_properties.cpp @@ -52,24 +52,32 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, BO m_thickness( aParent, m_ThicknessLabel, m_ThicknessCtrl, m_ThicknessUnits, true ), m_posX( aParent, m_PositionXLabel, m_PositionXCtrl, m_PositionXUnits ), m_posY( aParent, m_PositionYLabel, m_PositionYCtrl, m_PositionYUnits ), - m_linesThickness( aParent, m_LinesThicknessLabel, m_LinesThicknessCtrl, - m_LinesThicknessUnits, true ), + m_linesThickness( aParent, m_LineThicknessLabel, m_LineThicknessCtrl, + m_LineThicknessUnits, true ), m_OrientValidator( 1, &m_OrientValue ) { wxString title; - m_LinesThicknessLabel->Show( m_item->Type() == PCB_DIMENSION_T ); - m_LinesThicknessCtrl->Show( m_item->Type() == PCB_DIMENSION_T ); - m_LinesThicknessUnits->Show( m_item->Type() == PCB_DIMENSION_T ); + m_linesThickness.Show( m_item->Type() == PCB_DIMENSION_T ); if( m_item->Type() == PCB_DIMENSION_T ) { - title = _( "Dimension Text Properties" ); + title = _( "Dimension Properties" ); DIMENSION* dimension = (DIMENSION*) m_item; m_edaText = &dimension->Text(); m_pcbText = &dimension->Text(); + // Since this is really the object properties for a dimension (rather than just the + // text properties), make some of the propertie labels more explicit. + for( wxStaticText* label : { m_SizeXLabel, m_SizeYLabel, m_ThicknessLabel, + m_PositionXLabel, m_PositionYLabel, m_OrientLabel } ) + { + label->SetLabel( label->GetToolTipText() + wxT( ":" ) ); + } + + m_Mirrored->SetLabel( m_Mirrored->GetToolTipText() ); + SetInitialFocus( m_DimensionText ); m_SingleLineSizer->Show( false ); m_MultiLineSizer->Show( false ); @@ -158,7 +166,7 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, BO m_ThicknessCtrl, m_PositionXCtrl, m_PositionYCtrl, - m_LinesThicknessCtrl, + m_LineThicknessCtrl, m_Visible, m_Italic, m_JustifyChoice, diff --git a/pcbnew/dialogs/dialog_text_properties_base.cpp b/pcbnew/dialogs/dialog_text_properties_base.cpp index 39a4ee4194..a46944ff80 100644 --- a/pcbnew/dialogs/dialog_text_properties_base.cpp +++ b/pcbnew/dialogs/dialog_text_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jul 10 2019) +// C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -69,7 +69,7 @@ DIALOG_TEXT_PROPERTIES_BASE::DIALOG_TEXT_PROPERTIES_BASE( wxWindow* parent, wxWi m_DimensionTextSizer->Add( m_DimensionUnitsOpt, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bMainSizer->Add( m_DimensionTextSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 ); + bMainSizer->Add( m_DimensionTextSizer, 0, wxEXPAND|wxALL, 10 ); wxFlexGridSizer* fgSizerSetup; fgSizerSetup = new wxFlexGridSizer( 0, 5, 4, 0 ); @@ -80,22 +80,24 @@ DIALOG_TEXT_PROPERTIES_BASE::DIALOG_TEXT_PROPERTIES_BASE( wxWindow* parent, wxWi m_LayerLabel = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 ); m_LayerLabel->Wrap( -1 ); - fgSizerSetup->Add( m_LayerLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + fgSizerSetup->Add( m_LayerLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_LayerSelectionCtrl = new PCB_LAYER_BOX_SELECTOR( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - fgSizerSetup->Add( m_LayerSelectionCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + fgSizerSetup->Add( m_LayerSelectionCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM, 5 ); fgSizerSetup->Add( 0, 0, 0, wxRIGHT|wxLEFT, 40 ); m_Visible = new wxCheckBox( this, wxID_ANY, _("Visible"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerSetup->Add( m_Visible, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + fgSizerSetup->Add( m_Visible, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); fgSizerSetup->Add( 0, 0, 1, wxEXPAND, 5 ); m_SizeXLabel = new wxStaticText( this, wxID_ANY, _("Width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_SizeXLabel->Wrap( -1 ); + m_SizeXLabel->SetToolTip( _("Text width") ); + fgSizerSetup->Add( m_SizeXLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_SizeXCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); @@ -113,6 +115,8 @@ DIALOG_TEXT_PROPERTIES_BASE::DIALOG_TEXT_PROPERTIES_BASE( wxWindow* parent, wxWi m_SizeYLabel = new wxStaticText( this, wxID_ANY, _("Height:"), wxDefaultPosition, wxDefaultSize, 0 ); m_SizeYLabel->Wrap( -1 ); + m_SizeYLabel->SetToolTip( _("Text height") ); + fgSizerSetup->Add( m_SizeYLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_SizeYCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); @@ -130,10 +134,12 @@ DIALOG_TEXT_PROPERTIES_BASE::DIALOG_TEXT_PROPERTIES_BASE( wxWindow* parent, wxWi int m_JustifyChoiceNChoices = sizeof( m_JustifyChoiceChoices ) / sizeof( wxString ); m_JustifyChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_JustifyChoiceNChoices, m_JustifyChoiceChoices, 0 ); m_JustifyChoice->SetSelection( 0 ); - fgSizerSetup->Add( m_JustifyChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 3 ); + fgSizerSetup->Add( m_JustifyChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 3 ); m_ThicknessLabel = new wxStaticText( this, wxID_ANY, _("Thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); m_ThicknessLabel->Wrap( -1 ); + m_ThicknessLabel->SetToolTip( _("Text thickness") ); + fgSizerSetup->Add( m_ThicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_ThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); @@ -145,6 +151,8 @@ DIALOG_TEXT_PROPERTIES_BASE::DIALOG_TEXT_PROPERTIES_BASE( wxWindow* parent, wxWi m_OrientLabel = new wxStaticText( this, wxID_ANY, _("Orientation:"), wxDefaultPosition, wxDefaultSize, 0 ); m_OrientLabel->Wrap( -1 ); + m_OrientLabel->SetToolTip( _("Text orientation") ); + fgSizerSetup->Add( m_OrientLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_OrientCtrl = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); @@ -156,6 +164,8 @@ DIALOG_TEXT_PROPERTIES_BASE::DIALOG_TEXT_PROPERTIES_BASE( wxWindow* parent, wxWi m_PositionXLabel = new wxStaticText( this, wxID_ANY, _("Position X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_PositionXLabel->Wrap( -1 ); + m_PositionXLabel->SetToolTip( _("Text pos X") ); + fgSizerSetup->Add( m_PositionXLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_PositionXCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); @@ -166,6 +176,8 @@ DIALOG_TEXT_PROPERTIES_BASE::DIALOG_TEXT_PROPERTIES_BASE( wxWindow* parent, wxWi fgSizerSetup->Add( m_PositionXUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_Mirrored = new wxCheckBox( this, wxID_ANY, _("Mirrored"), wxDefaultPosition, wxDefaultSize, 0 ); + m_Mirrored->SetToolTip( _("Mirror text") ); + fgSizerSetup->Add( m_Mirrored, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); @@ -173,31 +185,35 @@ DIALOG_TEXT_PROPERTIES_BASE::DIALOG_TEXT_PROPERTIES_BASE( wxWindow* parent, wxWi m_PositionYLabel = new wxStaticText( this, wxID_ANY, _("Position Y:"), wxDefaultPosition, wxDefaultSize, 0 ); m_PositionYLabel->Wrap( -1 ); - fgSizerSetup->Add( m_PositionYLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + m_PositionYLabel->SetToolTip( _("Text pos Y") ); + + fgSizerSetup->Add( m_PositionYLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_PositionYCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); - fgSizerSetup->Add( m_PositionYCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + fgSizerSetup->Add( m_PositionYCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM, 5 ); m_PositionYUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_PositionYUnits->Wrap( -1 ); - fgSizerSetup->Add( m_PositionYUnits, 0, wxRIGHT|wxLEFT, 5 ); + fgSizerSetup->Add( m_PositionYUnits, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_KeepUpright = new wxCheckBox( this, wxID_ANY, _("Keep Upright"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerSetup->Add( m_KeepUpright, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_KeepUpright = new wxCheckBox( this, wxID_ANY, _("Keep upright"), wxDefaultPosition, wxDefaultSize, 0 ); + m_KeepUpright->SetToolTip( _("Keep text upright") ); + + fgSizerSetup->Add( m_KeepUpright, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); fgSizerSetup->Add( 0, 0, 1, wxEXPAND, 5 ); - m_LinesThicknessLabel = new wxStaticText( this, wxID_ANY, _("Lines thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LinesThicknessLabel->Wrap( -1 ); - fgSizerSetup->Add( m_LinesThicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + m_LineThicknessLabel = new wxStaticText( this, wxID_ANY, _("Line thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_LineThicknessLabel->Wrap( -1 ); + fgSizerSetup->Add( m_LineThicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - m_LinesThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); - fgSizerSetup->Add( m_LinesThicknessCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + m_LineThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); + fgSizerSetup->Add( m_LineThicknessCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); - m_LinesThicknessUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LinesThicknessUnits->Wrap( -1 ); - fgSizerSetup->Add( m_LinesThicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + m_LineThicknessUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_LineThicknessUnits->Wrap( -1 ); + fgSizerSetup->Add( m_LineThicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); bMainSizer->Add( fgSizerSetup, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 ); @@ -255,7 +271,7 @@ DIALOG_TEXT_PROPERTIES_BASE::DIALOG_TEXT_PROPERTIES_BASE( wxWindow* parent, wxWi m_OrientCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this ); m_PositionXCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this ); m_PositionYCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this ); - m_LinesThicknessCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this ); + m_LineThicknessCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this ); m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this ); } @@ -272,7 +288,7 @@ DIALOG_TEXT_PROPERTIES_BASE::~DIALOG_TEXT_PROPERTIES_BASE() m_OrientCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this ); m_PositionXCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this ); m_PositionYCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this ); - m_LinesThicknessCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this ); + m_LineThicknessCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this ); m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_text_properties_base.fbp b/pcbnew/dialogs/dialog_text_properties_base.fbp index c6c831e46f..f102992ff4 100644 --- a/pcbnew/dialogs/dialog_text_properties_base.fbp +++ b/pcbnew/dialogs/dialog_text_properties_base.fbp @@ -14,7 +14,6 @@ dialog_text_properties_base 1000 none - 1 DIALOG_TEXT_PROPERTIES_BASE @@ -26,7 +25,6 @@ 1 1 UI - 0 0 0 @@ -336,7 +334,7 @@ 10 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + wxEXPAND|wxALL 0 4 @@ -622,7 +620,7 @@ 4 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -683,7 +681,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM 0 1 @@ -758,7 +756,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -884,7 +882,7 @@ 0 - + Text width @@ -1145,7 +1143,7 @@ 0 - + Text height @@ -1341,7 +1339,7 @@ 3 - wxALIGN_CENTER_VERTICAL|wxEXPAND + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT 0 1 @@ -1457,7 +1455,7 @@ 0 - + Text thickness @@ -1644,7 +1642,7 @@ 0 - + Text orientation @@ -1771,7 +1769,7 @@ 0 - + Text pos X @@ -1958,7 +1956,7 @@ ; forward_declare 0 - + Mirror text wxFILTER_NONE wxDefaultValidator @@ -1980,7 +1978,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -2032,7 +2030,7 @@ 0 - + Text pos Y @@ -2041,7 +2039,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM 0 1 @@ -2106,7 +2104,7 @@ 5 - wxRIGHT|wxLEFT + wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -2167,7 +2165,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxLEFT + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT 0 1 @@ -2198,7 +2196,7 @@ 0 0 wxID_ANY - Keep Upright + Keep upright 0 @@ -2219,7 +2217,7 @@ ; forward_declare 0 - + Keep text upright wxFILTER_NONE wxDefaultValidator @@ -2241,7 +2239,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT 0 1 @@ -2271,7 +2269,7 @@ 0 0 wxID_ANY - Lines thickness: + Line thickness: 0 0 @@ -2280,7 +2278,7 @@ 0 1 - m_LinesThicknessLabel + m_LineThicknessLabel 1 @@ -2302,7 +2300,7 @@ 5 - wxEXPAND|wxTOP|wxBOTTOM + wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP 0 1 @@ -2340,7 +2338,7 @@ 0 1 - m_LinesThicknessCtrl + m_LineThicknessCtrl 1 @@ -2367,7 +2365,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT 0 1 @@ -2406,7 +2404,7 @@ 0 1 - m_LinesThicknessUnits + m_LineThicknessUnits 1 diff --git a/pcbnew/dialogs/dialog_text_properties_base.h b/pcbnew/dialogs/dialog_text_properties_base.h index e277105dc9..c01ea2824a 100644 --- a/pcbnew/dialogs/dialog_text_properties_base.h +++ b/pcbnew/dialogs/dialog_text_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jul 10 2019) +// C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -75,9 +75,9 @@ class DIALOG_TEXT_PROPERTIES_BASE : public DIALOG_SHIM wxTextCtrl* m_PositionYCtrl; wxStaticText* m_PositionYUnits; wxCheckBox* m_KeepUpright; - wxStaticText* m_LinesThicknessLabel; - wxTextCtrl* m_LinesThicknessCtrl; - wxStaticText* m_LinesThicknessUnits; + wxStaticText* m_LineThicknessLabel; + wxTextCtrl* m_LineThicknessCtrl; + wxStaticText* m_LineThicknessUnits; wxStaticText* m_statusLine; wxStaticLine* m_staticline; wxStdDialogButtonSizer* m_sdbSizer;