Split edge.cuts and courtyard layer defaults.
Fixes: lp:1788876 * https://bugs.launchpad.net/kicad/+bug/1788876
This commit is contained in:
parent
895fc0b536
commit
75a4928134
|
@ -32,7 +32,8 @@
|
|||
|
||||
#define DEFAULT_SILK_LINE_WIDTH 0.12
|
||||
#define DEFAULT_COPPER_LINE_WIDTH 0.20
|
||||
#define DEFAULT_EDGE_WIDTH 0.05 // used for Edge.Cuts and CrtYds
|
||||
#define DEFAULT_EDGE_WIDTH 0.05
|
||||
#define DEFAULT_COURTYARD_WIDTH 0.05
|
||||
#define DEFAULT_LINE_WIDTH 0.10
|
||||
|
||||
#define DEFAULT_SILK_TEXT_SIZE 1.0
|
||||
|
@ -152,6 +153,7 @@ enum
|
|||
LAYER_CLASS_SILK = 0,
|
||||
LAYER_CLASS_COPPER,
|
||||
LAYER_CLASS_EDGES,
|
||||
LAYER_CLASS_COURTYARD,
|
||||
LAYER_CLASS_OTHERS,
|
||||
|
||||
LAYER_CLASS_COUNT
|
||||
|
|
|
@ -432,6 +432,13 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() :
|
|||
m_TextItalic[ LAYER_CLASS_EDGES ] = false;
|
||||
m_TextUpright[ LAYER_CLASS_EDGES ] = true;
|
||||
|
||||
m_LineThickness[ LAYER_CLASS_COURTYARD ] = Millimeter2iu( DEFAULT_COURTYARD_WIDTH );
|
||||
m_TextSize[ LAYER_CLASS_COURTYARD ] = wxSize( Millimeter2iu( DEFAULT_TEXT_SIZE ),
|
||||
Millimeter2iu( DEFAULT_TEXT_SIZE ) );
|
||||
m_TextThickness[ LAYER_CLASS_COURTYARD ] = Millimeter2iu( DEFAULT_TEXT_WIDTH );
|
||||
m_TextItalic[ LAYER_CLASS_COURTYARD ] = false;
|
||||
m_TextUpright[ LAYER_CLASS_COURTYARD ] = true;
|
||||
|
||||
m_LineThickness[ LAYER_CLASS_OTHERS ] = Millimeter2iu( DEFAULT_LINE_WIDTH );
|
||||
m_TextSize[ LAYER_CLASS_OTHERS ] = wxSize( Millimeter2iu( DEFAULT_TEXT_SIZE ),
|
||||
Millimeter2iu( DEFAULT_TEXT_SIZE ) );
|
||||
|
@ -585,11 +592,16 @@ void BOARD_DESIGN_SETTINGS::AppendConfigs( BOARD* aBoard, PARAM_CFG_ARRAY* aResu
|
|||
aResult->push_back( new PARAM_CFG_BOOL( wxT( "CopperTextUpright" ),
|
||||
&m_TextUpright[ LAYER_CLASS_COPPER ], true ) );
|
||||
|
||||
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "EdgesAndCourtyardsLineWidth" ),
|
||||
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "EdgeCutLineWidth" ),
|
||||
&m_LineThickness[ LAYER_CLASS_EDGES ],
|
||||
Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
|
||||
nullptr, MM_PER_IU, wxT( "BoardOutlineThickness" ) ) );
|
||||
|
||||
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "CourtyardLineWidth" ),
|
||||
&m_LineThickness[ LAYER_CLASS_COURTYARD ],
|
||||
Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
|
||||
nullptr, MM_PER_IU ) );
|
||||
|
||||
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "OthersLineWidth" ),
|
||||
&m_LineThickness[ LAYER_CLASS_OTHERS ],
|
||||
Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
|
||||
|
|
|
@ -55,6 +55,7 @@ enum
|
|||
ROW_SILK,
|
||||
ROW_COPPER,
|
||||
ROW_EDGES,
|
||||
ROW_COURTYARD,
|
||||
ROW_OTHERS
|
||||
};
|
||||
|
||||
|
@ -144,7 +145,7 @@ bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow()
|
|||
m_Visible->Set3StateValue( wxCHK_UNDETERMINED );
|
||||
m_LayerCtrl->SetLayerSelection( UNDEFINED_LAYER );
|
||||
|
||||
#define SET_GRID_VALUE( aRow, aCol, aValue ) \
|
||||
#define SET_INT_VALUE( aRow, aCol, aValue ) \
|
||||
m_grid->SetCellValue( aRow, aCol, StringFromValue( GetUserUnits(), aValue, true, true ) )
|
||||
|
||||
#define SET_BOOL_VALUE( aRow, aCol, aValue ) \
|
||||
|
@ -158,31 +159,33 @@ bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow()
|
|||
const BOARD_DESIGN_SETTINGS& bds = m_parent->GetBoard()->GetDesignSettings();
|
||||
wxGridCellAttr* attr;
|
||||
|
||||
m_grid->SetCellValue( ROW_SILK, COL_CLASS_NAME, _( "Silk Layers" ) );
|
||||
m_grid->SetCellValue( ROW_COPPER, COL_CLASS_NAME, _( "Copper Layers" ) );
|
||||
m_grid->SetCellValue( ROW_EDGES, COL_CLASS_NAME, _( "Edges & Courtyards" ) );
|
||||
m_grid->SetCellValue( ROW_OTHERS, COL_CLASS_NAME, _( "Other Layers" ) );
|
||||
m_grid->SetCellValue( ROW_SILK, COL_CLASS_NAME, _( "Silk Layers" ) );
|
||||
m_grid->SetCellValue( ROW_COPPER, COL_CLASS_NAME, _( "Copper Layers" ) );
|
||||
m_grid->SetCellValue( ROW_EDGES, COL_CLASS_NAME, _( "Edge Cuts" ) );
|
||||
m_grid->SetCellValue( ROW_COURTYARD, COL_CLASS_NAME, _( "Courtyards" ) );
|
||||
m_grid->SetCellValue( ROW_OTHERS, COL_CLASS_NAME, _( "Other Layers" ) );
|
||||
|
||||
m_grid->SetCellValue( ROW_HEADER, COL_LINE_THICKNESS, _( "Line Thickness" ) );
|
||||
SET_GRID_VALUE( ROW_SILK, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_SILK ] );
|
||||
SET_GRID_VALUE( ROW_COPPER, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_COPPER ] );
|
||||
SET_GRID_VALUE( ROW_EDGES, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_EDGES ] );
|
||||
SET_GRID_VALUE( ROW_OTHERS, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_OTHERS ] );
|
||||
SET_INT_VALUE( ROW_SILK, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_SILK ] );
|
||||
SET_INT_VALUE( ROW_COPPER, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_COPPER ] );
|
||||
SET_INT_VALUE( ROW_EDGES, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_EDGES ] );
|
||||
SET_INT_VALUE( ROW_COURTYARD, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_COURTYARD ] );
|
||||
SET_INT_VALUE( ROW_OTHERS, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_OTHERS ] );
|
||||
|
||||
m_grid->SetCellValue( ROW_HEADER, COL_TEXT_WIDTH, _( "Text Width" ) );
|
||||
SET_GRID_VALUE( ROW_SILK, COL_TEXT_WIDTH, bds.m_TextSize[ LAYER_CLASS_SILK ].x );
|
||||
SET_GRID_VALUE( ROW_COPPER, COL_TEXT_WIDTH, bds.m_TextSize[ LAYER_CLASS_COPPER ].x );
|
||||
SET_GRID_VALUE( ROW_OTHERS, COL_TEXT_WIDTH, bds.m_TextSize[ LAYER_CLASS_OTHERS ].x );
|
||||
SET_INT_VALUE( ROW_SILK, COL_TEXT_WIDTH, bds.m_TextSize[ LAYER_CLASS_SILK ].x );
|
||||
SET_INT_VALUE( ROW_COPPER, COL_TEXT_WIDTH, bds.m_TextSize[ LAYER_CLASS_COPPER ].x );
|
||||
SET_INT_VALUE( ROW_OTHERS, COL_TEXT_WIDTH, bds.m_TextSize[ LAYER_CLASS_OTHERS ].x );
|
||||
|
||||
m_grid->SetCellValue( ROW_HEADER, COL_TEXT_HEIGHT, _( "Text Height" ) );
|
||||
SET_GRID_VALUE( ROW_SILK, COL_TEXT_HEIGHT, bds.m_TextSize[ LAYER_CLASS_SILK ].y );
|
||||
SET_GRID_VALUE( ROW_COPPER, COL_TEXT_HEIGHT, bds.m_TextSize[ LAYER_CLASS_COPPER ].y );
|
||||
SET_GRID_VALUE( ROW_OTHERS, COL_TEXT_HEIGHT, bds.m_TextSize[ LAYER_CLASS_OTHERS ].y );
|
||||
SET_INT_VALUE( ROW_SILK, COL_TEXT_HEIGHT, bds.m_TextSize[ LAYER_CLASS_SILK ].y );
|
||||
SET_INT_VALUE( ROW_COPPER, COL_TEXT_HEIGHT, bds.m_TextSize[ LAYER_CLASS_COPPER ].y );
|
||||
SET_INT_VALUE( ROW_OTHERS, COL_TEXT_HEIGHT, bds.m_TextSize[ LAYER_CLASS_OTHERS ].y );
|
||||
|
||||
m_grid->SetCellValue( ROW_HEADER, COL_TEXT_THICKNESS, _( "Text Thickness" ) );
|
||||
SET_GRID_VALUE( ROW_SILK, COL_TEXT_THICKNESS, bds.m_TextThickness[ LAYER_CLASS_SILK ] );
|
||||
SET_GRID_VALUE( ROW_COPPER, COL_TEXT_THICKNESS, bds.m_TextThickness[ LAYER_CLASS_COPPER ] );
|
||||
SET_GRID_VALUE( ROW_OTHERS, COL_TEXT_THICKNESS, bds.m_TextThickness[ LAYER_CLASS_OTHERS ] );
|
||||
SET_INT_VALUE( ROW_SILK, COL_TEXT_THICKNESS, bds.m_TextThickness[ LAYER_CLASS_SILK ] );
|
||||
SET_INT_VALUE( ROW_COPPER, COL_TEXT_THICKNESS, bds.m_TextThickness[ LAYER_CLASS_COPPER ] );
|
||||
SET_INT_VALUE( ROW_OTHERS, COL_TEXT_THICKNESS, bds.m_TextThickness[ LAYER_CLASS_OTHERS ] );
|
||||
|
||||
m_grid->SetCellValue( ROW_HEADER, COL_TEXT_ITALIC, _( "Italic" ) );
|
||||
SET_BOOL_VALUE( ROW_SILK, COL_TEXT_ITALIC, bds.m_TextItalic[ LAYER_CLASS_SILK ] );
|
||||
|
@ -196,7 +199,7 @@ bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow()
|
|||
|
||||
return true;
|
||||
|
||||
#undef SET_GRID_VALUE
|
||||
#undef SET_INT_VALUE
|
||||
#undef SET_BOOL_VALUE
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ enum
|
|||
ROW_SILK = 0,
|
||||
ROW_COPPER,
|
||||
ROW_EDGES,
|
||||
ROW_COURTYARD,
|
||||
ROW_OTHERS,
|
||||
|
||||
ROW_COUNT
|
||||
|
@ -94,7 +95,7 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataToWindow()
|
|||
{
|
||||
SET_MILS_CELL( i, COL_LINE_THICKNESS, m_BrdSettings->m_LineThickness[ i ] );
|
||||
|
||||
if( i == ROW_EDGES )
|
||||
if( i == ROW_EDGES || i == ROW_COURTYARD )
|
||||
{
|
||||
DISABLE_CELL( i, COL_TEXT_WIDTH );
|
||||
DISABLE_CELL( i, COL_TEXT_HEIGHT );
|
||||
|
@ -167,7 +168,7 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataFromWindow()
|
|||
{
|
||||
m_BrdSettings->m_LineThickness[ i ] = getGridValue( i, COL_LINE_THICKNESS );
|
||||
|
||||
if( i == ROW_EDGES ) // edges & courtyards only define line thickness
|
||||
if( i == ROW_EDGES || i == ROW_COURTYARD )
|
||||
continue;
|
||||
|
||||
m_BrdSettings->m_TextSize[ i ] =
|
||||
|
|
|
@ -25,7 +25,7 @@ PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::PANEL_SETUP_TEXT_AND_GRAPHICS_BASE( wxWindow
|
|||
m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
|
||||
// Grid
|
||||
m_grid->CreateGrid( 4, 6 );
|
||||
m_grid->CreateGrid( 5, 6 );
|
||||
m_grid->EnableEditing( true );
|
||||
m_grid->EnableGridLines( true );
|
||||
m_grid->EnableDragGridSize( false );
|
||||
|
@ -54,8 +54,9 @@ PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::PANEL_SETUP_TEXT_AND_GRAPHICS_BASE( wxWindow
|
|||
m_grid->SetRowLabelSize( 132 );
|
||||
m_grid->SetRowLabelValue( 0, _("Silk Layers") );
|
||||
m_grid->SetRowLabelValue( 1, _("Copper Layers") );
|
||||
m_grid->SetRowLabelValue( 2, _("Edges & Courtyards") );
|
||||
m_grid->SetRowLabelValue( 3, _("Other Layers") );
|
||||
m_grid->SetRowLabelValue( 2, _("Edge Cuts") );
|
||||
m_grid->SetRowLabelValue( 3, _("Courtyards") );
|
||||
m_grid->SetRowLabelValue( 4, _("Other Layers") );
|
||||
m_grid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
|
||||
|
||||
// Label Appearance
|
||||
|
|
|
@ -249,10 +249,10 @@
|
|||
<property name="resize">Resizable</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_LEFT</property>
|
||||
<property name="row_label_size">132</property>
|
||||
<property name="row_label_values">"Silk Layers" "Copper Layers" "Edges & Courtyards" "Other Layers"</property>
|
||||
<property name="row_label_values">"Silk Layers" "Copper Layers" "Edge Cuts" "Courtyards" "Other Layers"</property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
|
||||
<property name="row_sizes"></property>
|
||||
<property name="rows">4</property>
|
||||
<property name="rows">5</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="subclass">WX_GRID; widgets/wx_grid.h; forward_declare</property>
|
||||
|
|
|
@ -149,11 +149,16 @@ PARAM_CFG_ARRAY& FOOTPRINT_EDIT_FRAME::GetConfigurationSettings()
|
|||
m_configParams.push_back( new PARAM_CFG_BOOL( true, wxT( "FpEditorCopperTextItalic" ),
|
||||
&settings.m_TextItalic[ LAYER_CLASS_COPPER ] ) );
|
||||
|
||||
m_configParams.push_back( new PARAM_CFG_INT_WITH_SCALE( true, wxT( "FpEditorEdgesAndCourtyardsLineWidth" ),
|
||||
m_configParams.push_back( new PARAM_CFG_INT_WITH_SCALE( true, wxT( "FpEditorEdgeCutLineWidth" ),
|
||||
&settings.m_LineThickness[ LAYER_CLASS_EDGES ],
|
||||
Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
|
||||
nullptr, MM_PER_IU ) );
|
||||
|
||||
m_configParams.push_back( new PARAM_CFG_INT_WITH_SCALE( true, wxT( "FpEditorCourtyardLineWidth" ),
|
||||
&settings.m_LineThickness[ LAYER_CLASS_COURTYARD ],
|
||||
Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
|
||||
nullptr, MM_PER_IU ) );
|
||||
|
||||
m_configParams.push_back( new PARAM_CFG_INT_WITH_SCALE( true, wxT( "FpEditorOthersLineWidth" ),
|
||||
&settings.m_LineThickness[ LAYER_CLASS_OTHERS ],
|
||||
Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
|
||||
|
|
Loading…
Reference in New Issue