diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp
index 34799ba93c..85e02e8b5d 100644
--- a/pcbnew/dialogs/dialog_plot_base.cpp
+++ b/pcbnew/dialogs/dialog_plot_base.cpp
@@ -166,17 +166,17 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
wxBoxSizer* bSizerWarningText;
bSizerWarningText = new wxBoxSizer( wxVERTICAL );
- m_staticTextAlert = new wxStaticText( this, wxID_ANY, _("Global solder mask min width and/or margin are not set to 0. Most board houses"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextAlert = new wxStaticText( this, wxID_ANY, _("Global solder mask min width and/or margin are not set to 0. "), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextAlert->Wrap( -1 );
- bSizerWarningText->Add( m_staticTextAlert, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+ bSizerWarningText->Add( m_staticTextAlert, 0, wxTOP|wxLEFT, 5 );
+
+ m_staticTextAlert1 = new wxStaticText( this, wxID_ANY, _("Most board houses expect 0 and use their constraints, especially for solder mask min width."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextAlert1->Wrap( 580 );
+ bSizerWarningText->Add( m_staticTextAlert1, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
wxBoxSizer* bSizerSecondLine;
bSizerSecondLine = new wxBoxSizer( wxHORIZONTAL );
- m_staticTextAlert1 = new wxStaticText( this, wxID_ANY, _("expect 0 and use their constraints, especially for solder mask min width."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextAlert1->Wrap( 580 );
- bSizerSecondLine->Add( m_staticTextAlert1, 0, wxTOP, 2 );
-
bSizerSecondLine->Add( 0, 0, 1, wxEXPAND, 5 );
diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp
index 7144a3934b..87449da2ad 100644
--- a/pcbnew/dialogs/dialog_plot_base.fbp
+++ b/pcbnew/dialogs/dialog_plot_base.fbp
@@ -1741,7 +1741,7 @@
none
+
+ 5
+ wxTOP|wxBOTTOM|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Most board houses expect 0 and use their constraints, especially for solder mask min width.
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextAlert1
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+ ; ; forward_declare
+ 0
+
+
+
+
+ 580
+
+
5
wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT
@@ -1809,67 +1870,6 @@
bSizerSecondLine
wxHORIZONTAL
none
-
- 2
- wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- expect 0 and use their constraints, especially for solder mask min width.
- 0
-
- 0
-
-
- 0
-
- 1
- m_staticTextAlert1
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
- ; ; forward_declare
- 0
-
-
-
-
- 580
-
-
5
wxEXPAND
diff --git a/pcbnew/dialogs/panel_setup_mask_and_paste_base.cpp b/pcbnew/dialogs/panel_setup_mask_and_paste_base.cpp
index 3ce5fe7276..29f9c2affd 100644
--- a/pcbnew/dialogs/panel_setup_mask_and_paste_base.cpp
+++ b/pcbnew/dialogs/panel_setup_mask_and_paste_base.cpp
@@ -18,26 +18,35 @@ PANEL_SETUP_MASK_AND_PASTE_BASE::PANEL_SETUP_MASK_AND_PASTE_BASE( wxWindow* pare
bSizer3 = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bMessages;
- bMessages = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer4;
- bSizer4 = new wxBoxSizer( wxHORIZONTAL );
+ bMessages = new wxBoxSizer( wxHORIZONTAL );
m_bitmapWarning = new wxStaticBitmap( this, wxID_ANY, wxArtProvider::GetBitmap( wxART_WARNING, wxART_OTHER ), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer4->Add( m_bitmapWarning, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ bMessages->Add( m_bitmapWarning, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_staticTextInfoMaskMinWidth = new wxStaticText( this, wxID_ANY, _("Use your board house's recommendation for solder mask clearance and minimum bridge width.\nIf none is provided, setting the values to zero is suggested."), wxDefaultPosition, wxDefaultSize, 0 );
+ wxBoxSizer* bSizer4;
+ bSizer4 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextInfoMaskMinWidth = new wxStaticText( this, wxID_ANY, _("Use your board house's recommendation for solder mask clearance and minimum bridge width."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfoMaskMinWidth->Wrap( -1 );
m_staticTextInfoMaskMinWidth->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
bSizer4->Add( m_staticTextInfoMaskMinWidth, 0, wxALL|wxEXPAND, 5 );
+ m_staticTextInfoMaskMinWidth1 = new wxStaticText( this, wxID_ANY, _("If none is provided, setting the values to zero is suggested."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextInfoMaskMinWidth1->Wrap( -1 );
+ m_staticTextInfoMaskMinWidth1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
+
+ bSizer4->Add( m_staticTextInfoMaskMinWidth1, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
bMessages->Add( bSizer4, 1, wxEXPAND, 5 );
bSizer3->Add( bMessages, 0, wxEXPAND|wxALL, 5 );
+ m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer3->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
+
wxFlexGridSizer* fgGridSolderMaskSizer;
fgGridSolderMaskSizer = new wxFlexGridSizer( 0, 3, 0, 0 );
fgGridSolderMaskSizer->AddGrowableCol( 1 );
diff --git a/pcbnew/dialogs/panel_setup_mask_and_paste_base.fbp b/pcbnew/dialogs/panel_setup_mask_and_paste_base.fbp
index d80ea35479..c747ffba25 100644
--- a/pcbnew/dialogs/panel_setup_mask_and_paste_base.fbp
+++ b/pcbnew/dialogs/panel_setup_mask_and_paste_base.fbp
@@ -70,8 +70,66 @@
bMessages
- wxVERTICAL
+ wxHORIZONTAL
none
+
+ 5
+ wxALL|wxALIGN_CENTER_VERTICAL
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+ Load From Art Provider; wxART_WARNING; wxART_OTHER
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+
+ 0
+
+ 1
+ m_bitmapWarning
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+ ; ; forward_declare
+ 0
+
+
+
+
+
+
5
wxEXPAND
@@ -79,66 +137,8 @@
bSizer4
- wxHORIZONTAL
+ wxVERTICAL
none
-
- 5
- wxALL|wxALIGN_CENTER_VERTICAL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
- Load From Art Provider; wxART_WARNING; wxART_OTHER
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
-
- 0
-
- 1
- m_bitmapWarning
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
- ; ; forward_declare
- 0
-
-
-
-
-
-
5
wxALL|wxEXPAND
@@ -171,7 +171,7 @@
0
0
wxID_ANY
- Use your board house's recommendation for solder mask clearance and minimum bridge width.
If none is provided, setting the values to zero is suggested.
+ Use your board house's recommendation for solder mask clearance and minimum bridge width.
0
0
@@ -200,10 +200,129 @@
-1
+
+ 5
+ wxBOTTOM|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+ ,93,90,-1,70,0
+ 0
+ 0
+ wxID_ANY
+ If none is provided, setting the values to zero is suggested.
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextInfoMaskMinWidth1
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+ ; ; forward_declare
+ 0
+
+
+
+
+ -1
+
+
+
+ 5
+ wxEXPAND | wxALL
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticline1
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+ wxLI_HORIZONTAL
+ ; ; forward_declare
+ 0
+
+
+
+
+
+
5
wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT
diff --git a/pcbnew/dialogs/panel_setup_mask_and_paste_base.h b/pcbnew/dialogs/panel_setup_mask_and_paste_base.h
index 22d544b24f..d52e487559 100644
--- a/pcbnew/dialogs/panel_setup_mask_and_paste_base.h
+++ b/pcbnew/dialogs/panel_setup_mask_and_paste_base.h
@@ -21,6 +21,7 @@
#include
#include
#include
+#include
#include
#include
@@ -36,6 +37,8 @@ class PANEL_SETUP_MASK_AND_PASTE_BASE : public wxPanel
protected:
wxStaticBitmap* m_bitmapWarning;
wxStaticText* m_staticTextInfoMaskMinWidth;
+ wxStaticText* m_staticTextInfoMaskMinWidth1;
+ wxStaticLine* m_staticline1;
wxStaticText* m_MaskMarginLabel;
wxTextCtrl* m_MaskMarginCtrl;
wxStaticText* m_MaskMarginUnits;
diff --git a/pcbnew/dialogs/panel_setup_text_and_graphics.cpp b/pcbnew/dialogs/panel_setup_text_and_graphics.cpp
index bf51b5d327..e2ba63e1e4 100644
--- a/pcbnew/dialogs/panel_setup_text_and_graphics.cpp
+++ b/pcbnew/dialogs/panel_setup_text_and_graphics.cpp
@@ -71,6 +71,23 @@ PANEL_SETUP_TEXT_AND_GRAPHICS::PANEL_SETUP_TEXT_AND_GRAPHICS( PAGED_DIALOG* aPar
m_grid->AppendRows( 1 );
m_grid->DeleteRows( m_grid->GetNumberRows() - 1, 1 );
+ // Gives a suitable size to m_grid columns
+ // The default wxWidget col size is not very good
+ // Calculate a min best size to handle longest usual numeric values:
+ int min_best_width = m_grid->GetTextExtent( "555,555555 mils" ).x;
+
+ for( int i = 0; i < m_grid->GetNumberCols(); ++i )
+ {
+ // We calculate the column min size only from texts sizes, not using the initial col width
+ // as this initial width is sometimes strange depending on the language (wxGrid bug?)
+ int min_width = m_grid->GetVisibleWidth( i, true, true, false );
+
+ m_grid->SetColMinimalWidth( i, min_width );
+
+ // We use a "best size" >= min_best_width
+ m_grid->SetColSize( i, std::max( min_width, min_best_width ) );
+ }
+
m_grid->PushEventHandler( new GRID_TRICKS( m_grid ) );
}
diff --git a/pcbnew/dialogs/panel_setup_text_and_graphics_base.cpp b/pcbnew/dialogs/panel_setup_text_and_graphics_base.cpp
index 429bc71404..1cce7c1dc4 100644
--- a/pcbnew/dialogs/panel_setup_text_and_graphics_base.cpp
+++ b/pcbnew/dialogs/panel_setup_text_and_graphics_base.cpp
@@ -18,9 +18,9 @@ PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::PANEL_SETUP_TEXT_AND_GRAPHICS_BASE( wxWindow
m_gridSizer = new wxBoxSizer( wxVERTICAL );
- m_staticText1 = new wxStaticText( this, wxID_ANY, _("Default properties for new graphic items:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText1->Wrap( -1 );
- m_gridSizer->Add( m_staticText1, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ m_staticTextDefProp = new wxStaticText( this, wxID_ANY, _("Default properties for new graphic items:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDefProp->Wrap( -1 );
+ m_gridSizer->Add( m_staticTextDefProp, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
@@ -66,14 +66,14 @@ PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::PANEL_SETUP_TEXT_AND_GRAPHICS_BASE( wxWindow
m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
m_grid->SetToolTip( _("Net Class parameters") );
- m_gridSizer->Add( m_grid, 0, wxBOTTOM|wxLEFT, 20 );
+ m_gridSizer->Add( m_grid, 0, wxEXPAND|wxBOTTOM|wxLEFT, 5 );
m_gridSizer->Add( 0, 0, 0, wxEXPAND|wxTOP, 5 );
- m_staticText2 = new wxStaticText( this, wxID_ANY, _("Default properties for new dimension objects:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText2->Wrap( -1 );
- m_gridSizer->Add( m_staticText2, 0, wxALL, 5 );
+ m_staticTextDefPropDim = new wxStaticText( this, wxID_ANY, _("Default properties for new dimension objects:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDefPropDim->Wrap( -1 );
+ m_gridSizer->Add( m_staticTextDefPropDim, 0, wxALL, 5 );
wxGridBagSizer* gbSizer1;
gbSizer1 = new wxGridBagSizer( 0, 0 );
@@ -165,7 +165,7 @@ PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::PANEL_SETUP_TEXT_AND_GRAPHICS_BASE( wxWindow
m_gridSizer->Add( gbSizer1, 1, wxBOTTOM|wxEXPAND|wxLEFT, 20 );
- mainSizer->Add( m_gridSizer, 0, wxRIGHT|wxLEFT, 5 );
+ mainSizer->Add( m_gridSizer, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
this->SetSizer( mainSizer );
diff --git a/pcbnew/dialogs/panel_setup_text_and_graphics_base.fbp b/pcbnew/dialogs/panel_setup_text_and_graphics_base.fbp
index fdc36a8d89..549e37eed4 100644
--- a/pcbnew/dialogs/panel_setup_text_and_graphics_base.fbp
+++ b/pcbnew/dialogs/panel_setup_text_and_graphics_base.fbp
@@ -56,7 +56,7 @@
none
5
- wxRIGHT|wxLEFT
+ wxRIGHT|wxLEFT|wxEXPAND
0
@@ -104,7 +104,7 @@
0
1
- m_staticText1
+ m_staticTextDefProp
1
@@ -125,8 +125,8 @@
- 20
- wxBOTTOM|wxLEFT
+ 5
+ wxEXPAND|wxBOTTOM|wxLEFT
0
1
@@ -263,7 +263,7 @@
0
1
- m_staticText2
+ m_staticTextDefPropDim
1
diff --git a/pcbnew/dialogs/panel_setup_text_and_graphics_base.h b/pcbnew/dialogs/panel_setup_text_and_graphics_base.h
index 36a2f70ce3..8e5a3f7b51 100644
--- a/pcbnew/dialogs/panel_setup_text_and_graphics_base.h
+++ b/pcbnew/dialogs/panel_setup_text_and_graphics_base.h
@@ -37,9 +37,9 @@ class PANEL_SETUP_TEXT_AND_GRAPHICS_BASE : public wxPanel
protected:
wxBoxSizer* m_gridSizer;
- wxStaticText* m_staticText1;
+ wxStaticText* m_staticTextDefProp;
WX_GRID* m_grid;
- wxStaticText* m_staticText2;
+ wxStaticText* m_staticTextDefPropDim;
wxStaticText* m_lblDimensionUnits;
wxChoice* m_dimensionUnits;
wxStaticText* m_lblTextPositionMode;