Make all layers slightly semitransparent as before

This commit is contained in:
José Ignacio Romero 2017-03-07 11:57:52 +01:00 committed by Maciej Suminski
parent 2bb234d3f5
commit 45d1082517
2 changed files with 6 additions and 1 deletions

View File

@ -64,7 +64,10 @@ PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS()
void PCB_RENDER_SETTINGS::ImportLegacyColors( const COLORS_DESIGN_SETTINGS* aSettings )
{
for( int i = 0; i < LAYER_ID_COUNT; i++ )
{
m_layerColors[i] = aSettings->GetLayerColor( i );
m_layerColors[i].a = 0.8; // slightly transparent
}
for( int i = 0; i < END_PCB_VISIBLE_LIST; i++ )
m_layerColors[ITEM_GAL_LAYER( i )] = aSettings->GetItemColor( i );

View File

@ -734,12 +734,13 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable )
void PCB_EDIT_FRAME::forceColorsToLegacy()
{
COLORS_DESIGN_SETTINGS *cds = GetBoard()->GetColorsSettings();
COLORS_DESIGN_SETTINGS* cds = GetBoard()->GetColorsSettings();
for( int i = 0; i < LAYER_ID_COUNT; i++ )
{
COLOR4D c = cds->GetLayerColor( i );
c.SetToNearestLegacyColor();
c.a = 0.8;
cds->SetLayerColor( i, c );
}
@ -747,6 +748,7 @@ void PCB_EDIT_FRAME::forceColorsToLegacy()
{
COLOR4D c = cds->GetItemColor( i );
c.SetToNearestLegacyColor();
c.a = 0.8;
cds->SetItemColor( i, c );
}
}