From 2b81d3a93cdf7e6d548a7d00be7e1db0bd56d07f Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 30 Jul 2024 18:24:40 +0200 Subject: [PATCH] PANEL_SETUP_MASK_AND_PASTE_BASE: add tool tips and cosmetic enhancements No actual code change. --- .../panel_setup_mask_and_paste_base.cpp | 49 +++-- .../panel_setup_mask_and_paste_base.fbp | 168 ++++++++++++++++-- .../dialogs/panel_setup_mask_and_paste_base.h | 4 +- 3 files changed, 184 insertions(+), 37 deletions(-) diff --git a/pcbnew/dialogs/panel_setup_mask_and_paste_base.cpp b/pcbnew/dialogs/panel_setup_mask_and_paste_base.cpp index 8383dc8c00..64e84d1869 100644 --- a/pcbnew/dialogs/panel_setup_mask_and_paste_base.cpp +++ b/pcbnew/dialogs/panel_setup_mask_and_paste_base.cpp @@ -55,45 +55,55 @@ PANEL_SETUP_MASK_AND_PASTE_BASE::PANEL_SETUP_MASK_AND_PASTE_BASE( wxWindow* pare m_maskMarginLabel->Wrap( -1 ); m_maskMarginLabel->SetToolTip( _("Global clearance between pads and the solder mask.\nThis value can be superseded by local values for a footprint or a pad.") ); - gbSizer1->Add( m_maskMarginLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_maskMarginLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_stSolderMaskSettings = new wxStaticText( this, wxID_ANY, _("Solder mask settings:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stSolderMaskSettings->Wrap( -1 ); + m_stSolderMaskSettings->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + + gbSizer1->Add( m_stSolderMaskSettings, wxGBPosition( 0, 0 ), wxGBSpan( 1, 3 ), wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); m_maskMarginCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_maskMarginCtrl->SetToolTip( _("Positive clearance means area bigger than the pad (usual for solder mask clearance).") ); - gbSizer1->Add( m_maskMarginCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_maskMarginCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); m_maskMarginUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); m_maskMarginUnits->Wrap( -1 ); - gbSizer1->Add( m_maskMarginUnits, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + gbSizer1->Add( m_maskMarginUnits, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_maskMinWidthLabel = new wxStaticText( this, wxID_ANY, _("Solder mask minimum web width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_maskMinWidthLabel->Wrap( -1 ); m_maskMinWidthLabel->SetToolTip( _("Min. dist between 2 pad areas.\nTwo pad areas nearer than this value will be merged during plotting.\nThis parameter is only used to plot solder mask layers.\nLeave at 0 unless you know what you are doing.") ); - gbSizer1->Add( m_maskMinWidthLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_maskMinWidthLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); m_maskMinWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_maskMinWidthCtrl->SetToolTip( _("Minimum distance between openings in the solder mask. Pad openings closer than this distance will be plotted as a single opening.") ); - gbSizer1->Add( m_maskMinWidthCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_maskMinWidthCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); m_maskMinWidthUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); m_maskMinWidthUnits->Wrap( -1 ); - gbSizer1->Add( m_maskMinWidthUnits, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_maskMinWidthUnits, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); m_maskToCopperClearanceLabel = new wxStaticText( this, wxID_ANY, _("Solder mask to copper clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); m_maskToCopperClearanceLabel->Wrap( -1 ); - gbSizer1->Add( m_maskToCopperClearanceLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + m_maskToCopperClearanceLabel->SetToolTip( _("For DRC tests:\nmax distance between a solder mask opening and a copper item having a different net than the parent solder mask opening to create a DRC error") ); + + gbSizer1->Add( m_maskToCopperClearanceLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_maskToCopperClearanceCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - gbSizer1->Add( m_maskToCopperClearanceCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_maskToCopperClearanceCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); m_maskToCopperClearanceUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); m_maskToCopperClearanceUnits->Wrap( -1 ); - gbSizer1->Add( m_maskToCopperClearanceUnits, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + gbSizer1->Add( m_maskToCopperClearanceUnits, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_allowBridges = new wxCheckBox( this, wxID_ANY, _("Allow bridged solder mask apertures between pads within footprints"), wxDefaultPosition, wxDefaultSize, 0 ); - gbSizer1->Add( m_allowBridges, wxGBPosition( 3, 0 ), wxGBSpan( 1, 3 ), wxALL, 5 ); + m_allowBridges->SetToolTip( _("For DRC tests:\nDisable DRC error type solder mask aperture bridge between pads of the same footprint (useful for net ties)") ); + + gbSizer1->Add( m_allowBridges, wxGBPosition( 4, 0 ), wxGBSpan( 1, 3 ), wxALL, 5 ); wxBoxSizer* bSizer6; bSizer6 = new wxBoxSizer( wxHORIZONTAL ); @@ -113,28 +123,34 @@ PANEL_SETUP_MASK_AND_PASTE_BASE::PANEL_SETUP_MASK_AND_PASTE_BASE( wxWindow* pare bSizer6->Add( m_tentViasBack, 0, wxALL, 5 ); - gbSizer1->Add( bSizer6, wxGBPosition( 4, 0 ), wxGBSpan( 1, 3 ), wxEXPAND, 5 ); + gbSizer1->Add( bSizer6, wxGBPosition( 5, 0 ), wxGBSpan( 1, 3 ), wxEXPAND, 5 ); + + m_stSolderPasteSettings = new wxStaticText( this, wxID_ANY, _("Solder paste settings:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stSolderPasteSettings->Wrap( -1 ); + m_stSolderPasteSettings->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + + gbSizer1->Add( m_stSolderPasteSettings, wxGBPosition( 6, 0 ), wxGBSpan( 1, 3 ), wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); m_pasteMarginLabel = new wxStaticText( this, wxID_ANY, _("Solder paste absolute clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); m_pasteMarginLabel->Wrap( -1 ); m_pasteMarginLabel->SetToolTip( _("Global clearance between pads and the solder paste.\nThis value can be superseded by local values for a footprint or a pad.\nFinal clearance value is the sum of this value and the clearance value ratio.") ); - gbSizer1->Add( m_pasteMarginLabel, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + gbSizer1->Add( m_pasteMarginLabel, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_pasteMarginCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_pasteMarginCtrl->SetToolTip( _("Negative clearance means area smaller than the pad (usual for solder paste clearance).") ); - gbSizer1->Add( m_pasteMarginCtrl, wxGBPosition( 6, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_pasteMarginCtrl, wxGBPosition( 8, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); m_pasteMarginUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); m_pasteMarginUnits->Wrap( -1 ); - gbSizer1->Add( m_pasteMarginUnits, wxGBPosition( 6, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + gbSizer1->Add( m_pasteMarginUnits, wxGBPosition( 7, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_pasteMarginRatioLabel = new wxStaticText( this, wxID_ANY, _("Solder paste relative clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); m_pasteMarginRatioLabel->Wrap( -1 ); m_pasteMarginRatioLabel->SetToolTip( _("Global clearance ratio in percent between pads and the solder paste.\nA value of 10 means the clearance value is 10 percent of the pad size.\nThis value can be superseded by local values for a footprint or a pad.\nFinal clearance value is the sum of this value and the clearance value.") ); - gbSizer1->Add( m_pasteMarginRatioLabel, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + gbSizer1->Add( m_pasteMarginRatioLabel, wxGBPosition( 8, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_pasteMarginRatioCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_pasteMarginRatioCtrl->SetToolTip( _("Additional clearance as a percentage of the pad size.") ); @@ -143,7 +159,7 @@ PANEL_SETUP_MASK_AND_PASTE_BASE::PANEL_SETUP_MASK_AND_PASTE_BASE( wxWindow* pare m_pasteMarginRatioUnits = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); m_pasteMarginRatioUnits->Wrap( -1 ); - gbSizer1->Add( m_pasteMarginRatioUnits, wxGBPosition( 7, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + gbSizer1->Add( m_pasteMarginRatioUnits, wxGBPosition( 8, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); bSizer3->Add( gbSizer1, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); @@ -158,7 +174,6 @@ PANEL_SETUP_MASK_AND_PASTE_BASE::PANEL_SETUP_MASK_AND_PASTE_BASE( wxWindow* pare this->SetSizer( bMainSizer ); this->Layout(); - bMainSizer->Fit( this ); } PANEL_SETUP_MASK_AND_PASTE_BASE::~PANEL_SETUP_MASK_AND_PASTE_BASE() diff --git a/pcbnew/dialogs/panel_setup_mask_and_paste_base.fbp b/pcbnew/dialogs/panel_setup_mask_and_paste_base.fbp index c26db8a332..362ae65bb3 100644 --- a/pcbnew/dialogs/panel_setup_mask_and_paste_base.fbp +++ b/pcbnew/dialogs/panel_setup_mask_and_paste_base.fbp @@ -48,7 +48,7 @@ PANEL_SETUP_MASK_AND_PASTE_BASE - -1,-1 + 606,401 ; forward_declare 0 @@ -363,7 +363,7 @@ 1 0 wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL - 0 + 1 1 1 @@ -423,12 +423,77 @@ -1 + + 5 + 3 + 0 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + ,90,700,-1,70,0 + 0 + 0 + wxID_ANY + Solder mask settings: + 0 + + 0 + + + 0 + + 1 + m_stSolderMaskSettings + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + 5 1 1 wxALIGN_CENTER_VERTICAL - 0 + 1 1 1 @@ -496,7 +561,7 @@ 1 2 wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 + 1 1 1 @@ -561,7 +626,7 @@ 1 0 wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL - 1 + 2 1 1 @@ -626,7 +691,7 @@ 1 1 wxALIGN_CENTER_VERTICAL - 1 + 2 1 1 @@ -694,7 +759,7 @@ 1 2 wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL - 1 + 2 1 1 @@ -759,7 +824,7 @@ 1 0 wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 2 + 3 1 1 @@ -812,7 +877,7 @@ ; ; forward_declare 0 - + For DRC tests: max distance between a solder mask opening and a copper item having a different net than the parent solder mask opening to create a DRC error @@ -824,7 +889,7 @@ 1 1 wxALIGN_CENTER_VERTICAL - 2 + 3 1 1 @@ -892,7 +957,7 @@ 1 2 wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 2 + 3 1 1 @@ -957,7 +1022,7 @@ 3 0 wxALL - 3 + 4 1 1 @@ -1010,7 +1075,7 @@ ; ; forward_declare 0 - + For DRC tests: Disable DRC error type solder mask aperture bridge between pads of the same footprint (useful for net ties) wxFILTER_NONE wxDefaultValidator @@ -1025,7 +1090,7 @@ 3 0 wxEXPAND - 4 + 5 1 @@ -1226,12 +1291,77 @@ + + 5 + 3 + 0 + wxALL|wxALIGN_CENTER_HORIZONTAL + 6 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + ,90,700,-1,70,0 + 0 + 0 + wxID_ANY + Solder paste settings: + 0 + + 0 + + + 0 + + 1 + m_stSolderPasteSettings + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + 5 1 0 wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 6 + 7 1 1 @@ -1296,7 +1426,7 @@ 1 1 wxALIGN_CENTER_VERTICAL - 6 + 8 1 1 @@ -1364,7 +1494,7 @@ 1 2 wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 6 + 7 1 1 @@ -1429,7 +1559,7 @@ 1 0 wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 7 + 8 1 1 @@ -1562,7 +1692,7 @@ 1 2 wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 7 + 8 1 1 diff --git a/pcbnew/dialogs/panel_setup_mask_and_paste_base.h b/pcbnew/dialogs/panel_setup_mask_and_paste_base.h index e2a5d87726..5c5eef0430 100644 --- a/pcbnew/dialogs/panel_setup_mask_and_paste_base.h +++ b/pcbnew/dialogs/panel_setup_mask_and_paste_base.h @@ -42,6 +42,7 @@ class PANEL_SETUP_MASK_AND_PASTE_BASE : public wxPanel wxStaticText* m_staticTextInfoMaskMinWidth1; wxStaticLine* m_staticline1; wxStaticText* m_maskMarginLabel; + wxStaticText* m_stSolderMaskSettings; wxTextCtrl* m_maskMarginCtrl; wxStaticText* m_maskMarginUnits; wxStaticText* m_maskMinWidthLabel; @@ -54,6 +55,7 @@ class PANEL_SETUP_MASK_AND_PASTE_BASE : public wxPanel wxStaticText* m_stTenting; wxCheckBox* m_tentViasFront; wxCheckBox* m_tentViasBack; + wxStaticText* m_stSolderPasteSettings; wxStaticText* m_pasteMarginLabel; wxTextCtrl* m_pasteMarginCtrl; wxStaticText* m_pasteMarginUnits; @@ -64,7 +66,7 @@ class PANEL_SETUP_MASK_AND_PASTE_BASE : public wxPanel public: - PANEL_SETUP_MASK_AND_PASTE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); + PANEL_SETUP_MASK_AND_PASTE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 606,401 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); ~PANEL_SETUP_MASK_AND_PASTE_BASE();