Configurable hyperlink hovering color
This commit is contained in:
parent
840bcffefb
commit
20ed9b475b
|
@ -141,6 +141,7 @@ wxString LayerName( int aLayer )
|
|||
case LAYER_SCHEMATIC_GRID_AXES: return _( "Axes" );
|
||||
case LAYER_SCHEMATIC_BACKGROUND: return _( "Background" );
|
||||
case LAYER_SCHEMATIC_CURSOR: return _( "Cursor" );
|
||||
case LAYER_HOVERED: return _( "Hovered items" );
|
||||
case LAYER_BRIGHTENED: return _( "Highlighted items" );
|
||||
case LAYER_HIDDEN: return _( "Hidden items" );
|
||||
case LAYER_SELECTION_SHADOWS: return _( "Selection highlight" );
|
||||
|
|
|
@ -30,6 +30,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_HOVERED, CSS_COLOR( 0, 0, 255, 1 ) },
|
||||
{ LAYER_BRIGHTENED, CSS_COLOR( 255, 0, 255, 1 ) },
|
||||
{ LAYER_BUS, CSS_COLOR( 0, 0, 132, 1 ) },
|
||||
{ LAYER_BUS_JUNCTION, CSS_COLOR( 0, 0, 132, 1 ) },
|
||||
|
@ -184,6 +185,7 @@ 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_HOVERED, COLOR4D( BLUE ) },
|
||||
{ LAYER_BRIGHTENED, COLOR4D( PUREMAGENTA ) },
|
||||
{ LAYER_BUS, COLOR4D( BLUE ) },
|
||||
{ LAYER_BUS_JUNCTION, COLOR4D( BLUE ) },
|
||||
|
@ -201,7 +203,7 @@ static const std::map<int, COLOR4D> s_classicTheme =
|
|||
{ LAYER_GLOBLABEL, COLOR4D( RED ) },
|
||||
{ LAYER_HIERLABEL, COLOR4D( BROWN ) },
|
||||
{ LAYER_LOCLABEL, COLOR4D( BLACK ) },
|
||||
{ LAYER_NETCLASS_REFS, COLOR4D( BLACK ) },
|
||||
{ LAYER_NETCLASS_REFS, COLOR4D( BLACK ) },
|
||||
{ LAYER_NOCONNECT, COLOR4D( BLUE ) },
|
||||
{ LAYER_NOTES, COLOR4D( LIGHTBLUE ) },
|
||||
{ LAYER_PRIVATE_NOTES, COLOR4D( LIGHTBLUE ) },
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
|
||||
///! Update the schema version whenever a migration is required
|
||||
const int colorsSchemaVersion = 4;
|
||||
const int colorsSchemaVersion = 5;
|
||||
|
||||
|
||||
COLOR_SETTINGS::COLOR_SETTINGS( const wxString& aFilename, bool aAbsolutePath ) :
|
||||
|
@ -76,6 +76,7 @@ COLOR_SETTINGS::COLOR_SETTINGS( const wxString& aFilename, bool aAbsolutePath )
|
|||
CLR( "schematic.anchor", LAYER_SCHEMATIC_ANCHOR );
|
||||
CLR( "schematic.aux_items", LAYER_SCHEMATIC_AUX_ITEMS );
|
||||
CLR( "schematic.background", LAYER_SCHEMATIC_BACKGROUND );
|
||||
CLR( "schematic.hovered", LAYER_HOVERED );
|
||||
CLR( "schematic.brightened", LAYER_BRIGHTENED );
|
||||
CLR( "schematic.bus", LAYER_BUS );
|
||||
CLR( "schematic.bus_junction", LAYER_BUS_JUNCTION );
|
||||
|
|
|
@ -1837,6 +1837,12 @@ void SCH_PAINTER::draw( const SCH_TEXT *aText, int aLayer )
|
|||
return;
|
||||
}
|
||||
|
||||
if( aText->IsHypertext() && ( aText->GetFlags() & IS_ROLLOVER ) && !drawingShadows
|
||||
&& !aText->IsMoving() )
|
||||
{
|
||||
color = m_schSettings.GetLayerColor( LAYER_HOVERED );
|
||||
}
|
||||
|
||||
m_gal->SetStrokeColor( color );
|
||||
m_gal->SetFillColor( color );
|
||||
|
||||
|
@ -2164,7 +2170,7 @@ void SCH_PAINTER::draw( const SCH_FIELD *aField, int aLayer )
|
|||
if( aField->IsHypertext() && ( aField->GetFlags() & IS_ROLLOVER ) > 0
|
||||
&& !drawingShadows && !aField->IsMoving() )
|
||||
{
|
||||
color = PUREBLUE;
|
||||
color = m_schSettings.GetLayerColor( LAYER_HOVERED );
|
||||
}
|
||||
|
||||
// Calculate the text orientation according to the parent orientation.
|
||||
|
|
|
@ -375,6 +375,7 @@ enum SCH_LAYER_ID: int
|
|||
LAYER_SCHEMATIC_GRID_AXES,
|
||||
LAYER_SCHEMATIC_BACKGROUND,
|
||||
LAYER_SCHEMATIC_CURSOR,
|
||||
LAYER_HOVERED,
|
||||
LAYER_BRIGHTENED,
|
||||
LAYER_HIDDEN,
|
||||
LAYER_SELECTION_SHADOWS,
|
||||
|
|
Loading…
Reference in New Issue