eeschema: Add highlight color to configurable list

The highlight color chosen from the system highlight doesn't always show
against the schematic sheet background color.  Allowing the user to
customize with their KiCad theme makes it configurable on par with other
colors.  This is stop-gap until we get full color schemes from
lp:1678345
This commit is contained in:
Seth Hillbrand 2019-08-26 21:43:59 -07:00
parent ff118c62ec
commit 548dbb7c29
3 changed files with 11 additions and 10 deletions

View File

@ -220,6 +220,7 @@ static PARAM_CFG_ARRAY& cfg_params()
CLR( "Color4DBrightenedEx", LAYER_BRIGHTENED, COLOR4D( PUREMAGENTA ) ) CLR( "Color4DBrightenedEx", LAYER_BRIGHTENED, COLOR4D( PUREMAGENTA ) )
CLR( "Color4DHiddenEx", LAYER_HIDDEN, COLOR4D( LIGHTGRAY ) ) CLR( "Color4DHiddenEx", LAYER_HIDDEN, COLOR4D( LIGHTGRAY ) )
CLR( "Color4DWorksheetEx", LAYER_WORKSHEET, COLOR4D( RED ) ) CLR( "Color4DWorksheetEx", LAYER_WORKSHEET, COLOR4D( RED ) )
CLR( "Color4DShadowEx", LAYER_SELECTION_SHADOWS, COLOR4D( .4, .7, 1.0, 0.8 ) )
} }
return ca; return ca;

View File

@ -237,7 +237,6 @@ float SCH_PAINTER::getShadowWidth()
COLOR4D SCH_PAINTER::getRenderColor( const EDA_ITEM* aItem, int aLayer, bool aDrawingShadows ) COLOR4D SCH_PAINTER::getRenderColor( const EDA_ITEM* aItem, int aLayer, bool aDrawingShadows )
{ {
static COLOR4D highlightColor( 1.0, 0.3, 0.3, 1.0 ); static COLOR4D highlightColor( 1.0, 0.3, 0.3, 1.0 );
static COLOR4D selectionColor = wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT );
COLOR4D color = m_schSettings.GetLayerColor( aLayer ); COLOR4D color = m_schSettings.GetLayerColor( aLayer );
@ -254,7 +253,7 @@ COLOR4D SCH_PAINTER::getRenderColor( const EDA_ITEM* aItem, int aLayer, bool aDr
else if( aItem->IsSelected() ) else if( aItem->IsSelected() )
{ {
if( aDrawingShadows ) if( aDrawingShadows )
color = selectionColor.WithAlpha( 0.8 ); color = m_schSettings.GetLayerColor( LAYER_SELECTION_SHADOWS ).WithAlpha( 0.8 );
} }
else if( aItem->IsHighlighted() ) // Cross-probing else if( aItem->IsHighlighted() ) // Cross-probing
{ {

View File

@ -88,14 +88,15 @@ static COLORBUTTON sheetColorButtons[] = {
}; };
static COLORBUTTON miscColorButtons[] = { static COLORBUTTON miscColorButtons[] = {
{ _( "ERC warning" ), LAYER_ERC_WARN }, { _( "ERC warning" ), LAYER_ERC_WARN },
{ _( "ERC error" ), LAYER_ERC_ERR }, { _( "ERC error" ), LAYER_ERC_ERR },
{ _( "Brightened" ), LAYER_BRIGHTENED }, { _( "Brightened" ), LAYER_BRIGHTENED },
{ _( "Hidden items" ), LAYER_HIDDEN }, { _( "Hidden items" ), LAYER_HIDDEN },
{ _( "Worksheet" ), LAYER_WORKSHEET }, { _( "Worksheet" ), LAYER_WORKSHEET },
{ _( "Cursor" ), LAYER_SCHEMATIC_CURSOR }, { _( "Cursor" ), LAYER_SCHEMATIC_CURSOR },
{ _( "Grid" ), LAYER_SCHEMATIC_GRID }, { _( "Grid" ), LAYER_SCHEMATIC_GRID },
{ _( "Background" ), LAYER_SCHEMATIC_BACKGROUND }, { _( "Background" ), LAYER_SCHEMATIC_BACKGROUND },
{ _( "Selection Highlight" ), LAYER_SELECTION_SHADOWS },
{ wxT( "" ), -1 } // Sentinel marking end of list. { wxT( "" ), -1 } // Sentinel marking end of list.
}; };