Remove hard-coded anchor color in eeschema

This commit is contained in:
Jon Evans 2021-09-28 20:26:47 -04:00
parent adafb15126
commit 62ef27e372
5 changed files with 7 additions and 2 deletions

View File

@ -127,6 +127,7 @@ wxString LayerName( int aLayer )
case LAYER_NOCONNECT: return _( "No-connect symbols" );
case LAYER_ERC_WARN: return _( "ERC warnings" );
case LAYER_ERC_ERR: return _( "ERC errors" );
case LAYER_SCHEMATIC_ANCHOR: return _( "Anchors" );
case LAYER_SCHEMATIC_AUX_ITEMS: return _( "Helper items" );
case LAYER_SCHEMATIC_GRID: return _( "Grid" );
case LAYER_SCHEMATIC_GRID_AXES: return _( "Axes" );

View File

@ -27,6 +27,7 @@
static const std::map<int, COLOR4D> s_defaultTheme =
{
{ LAYER_SCHEMATIC_ANCHOR, CSS_COLOR( 0, 0, 255, 1 ) },
{ LAYER_SCHEMATIC_AUX_ITEMS, CSS_COLOR( 0, 0, 0, 1 ) },
{ LAYER_SCHEMATIC_BACKGROUND, CSS_COLOR( 245, 244, 239, 1 ) },
{ LAYER_BRIGHTENED, CSS_COLOR( 255, 0, 255, 1 ) },
@ -171,6 +172,7 @@ static const std::map<int, COLOR4D> s_defaultTheme =
static const std::map<int, COLOR4D> s_classicTheme =
{
{ LAYER_SCHEMATIC_ANCHOR, CSS_COLOR( 0, 0, 255, 1 ) },
{ LAYER_SCHEMATIC_AUX_ITEMS, COLOR4D( BLACK ) },
{ LAYER_SCHEMATIC_BACKGROUND, COLOR4D( WHITE ) },
{ LAYER_BRIGHTENED, COLOR4D( PUREMAGENTA ) },

View File

@ -71,6 +71,7 @@ COLOR_SETTINGS::COLOR_SETTINGS( const wxString& aFilename ) :
wxASSERT( s_defaultTheme.count( y ) ); \
m_params.emplace_back( new COLOR_MAP_PARAM( x, y, s_defaultTheme.at( y ), &m_colors ) );
CLR( "schematic.anchor", LAYER_SCHEMATIC_ANCHOR );
CLR( "schematic.aux_items", LAYER_SCHEMATIC_AUX_ITEMS );
CLR( "schematic.background", LAYER_SCHEMATIC_BACKGROUND );
CLR( "schematic.brightened", LAYER_BRIGHTENED );

View File

@ -700,7 +700,7 @@ void SCH_PAINTER::draw( const LIB_FIELD *aField, int aLayer )
if( aField->IsMoving() && m_schSettings.m_ShowUmbilicals )
{
m_gal->SetLineWidth( m_schSettings.m_outlineWidth );
m_gal->SetStrokeColor( COLOR4D( 0.0, 0.0, 1.0, 1.0 ) );
m_gal->SetStrokeColor( getRenderColor( aField, LAYER_SCHEMATIC_ANCHOR, drawingShadows ) );
m_gal->DrawLine( textpos, wxPoint( 0, 0 ) );
}
}
@ -1640,7 +1640,7 @@ void SCH_PAINTER::draw( const SCH_FIELD *aField, int aLayer )
wxPoint parentPos = aField->GetParentPosition();
m_gal->SetLineWidth( m_schSettings.m_outlineWidth );
m_gal->SetStrokeColor( COLOR4D( 0.0, 0.0, 1.0, 1.0 ) );
m_gal->SetStrokeColor( getRenderColor( aField, LAYER_SCHEMATIC_ANCHOR, drawingShadows ) );
m_gal->DrawLine( textpos, parentPos );
}
}

View File

@ -358,6 +358,7 @@ enum SCH_LAYER_ID: int
LAYER_SCHEMATIC_DRAWINGSHEET,
LAYER_BUS_JUNCTION,
LAYER_SCHEMATIC_AUX_ITEMS,
LAYER_SCHEMATIC_ANCHOR,
SCH_LAYER_ID_END
};