Use selection highlight color for sel shadows even when brightened.

This allows Find & Change to show both matches and current match.

Fixes https://gitlab.com/kicad/code/kicad/issues/11101
This commit is contained in:
Jeff Young 2022-03-27 13:59:34 +01:00
parent d440ff7c37
commit 265ff90e19
1 changed files with 9 additions and 2 deletions

View File

@ -375,11 +375,18 @@ COLOR4D SCH_PAINTER::getRenderColor( const EDA_ITEM* aItem, int aLayer, bool aDr
color = m_schSettings.GetLayerColor( LAYER_BRIGHTENED ); color = m_schSettings.GetLayerColor( LAYER_BRIGHTENED );
if( aDrawingShadows ) if( aDrawingShadows )
color = color.WithAlpha( 0.15 ); {
if( aItem->IsSelected() )
color = m_schSettings.GetLayerColor( LAYER_SELECTION_SHADOWS );
else
color = color.WithAlpha( 0.15 );
}
else if( aLayer == LAYER_DEVICE_BACKGROUND || aLayer == LAYER_SHEET_BACKGROUND ) else if( aLayer == LAYER_DEVICE_BACKGROUND || aLayer == LAYER_SHEET_BACKGROUND )
{
color = color.WithAlpha( 0.2 ); color = color.WithAlpha( 0.2 );
}
} }
else if( aItem->IsSelected() ) else if( aItem->IsSelected() && aDrawingShadows )
{ {
if( aDrawingShadows ) if( aDrawingShadows )
color = m_schSettings.GetLayerColor( LAYER_SELECTION_SHADOWS ); color = m_schSettings.GetLayerColor( LAYER_SELECTION_SHADOWS );