Add user-configurability of the LibEdit axes color.

This commit is contained in:
Jeff Young 2020-03-22 00:03:59 +00:00
parent 5f60d955be
commit c4aed3a8de
4 changed files with 8 additions and 0 deletions

View File

@ -103,6 +103,9 @@ wxString LayerName( SCH_LAYER_ID aLayer )
case LAYER_SCHEMATIC_GRID: case LAYER_SCHEMATIC_GRID:
return _( "Grid" ); return _( "Grid" );
case LAYER_SCHEMATIC_GRID_AXES:
return _( "Axes" );
case LAYER_SCHEMATIC_BACKGROUND: case LAYER_SCHEMATIC_BACKGROUND:
return _( "Background" ); return _( "Background" );

View File

@ -68,6 +68,7 @@ COLOR_SETTINGS::COLOR_SETTINGS( std::string aFilename ) :
CLR( "schematic.erc_warning", LAYER_ERC_WARN, COLOR4D( GREEN ).WithAlpha( 0.8 ) ); CLR( "schematic.erc_warning", LAYER_ERC_WARN, COLOR4D( GREEN ).WithAlpha( 0.8 ) );
CLR( "schematic.fields", LAYER_FIELDS, COLOR4D( MAGENTA ) ); CLR( "schematic.fields", LAYER_FIELDS, COLOR4D( MAGENTA ) );
CLR( "schematic.grid", LAYER_SCHEMATIC_GRID, COLOR4D( DARKGRAY ) ); CLR( "schematic.grid", LAYER_SCHEMATIC_GRID, COLOR4D( DARKGRAY ) );
CLR( "schematic.grid_axes", LAYER_SCHEMATIC_GRID_AXES, COLOR4D( BLUE ) );
CLR( "schematic.hidden", LAYER_HIDDEN, COLOR4D( LIGHTGRAY ) ); CLR( "schematic.hidden", LAYER_HIDDEN, COLOR4D( LIGHTGRAY ) );
CLR( "schematic.junction", LAYER_JUNCTION, COLOR4D( GREEN ) ); CLR( "schematic.junction", LAYER_JUNCTION, COLOR4D( GREEN ) );
CLR( "schematic.label_global", LAYER_GLOBLABEL, COLOR4D( RED ) ); CLR( "schematic.label_global", LAYER_GLOBLABEL, COLOR4D( RED ) );

View File

@ -790,6 +790,8 @@ void LIB_EDIT_FRAME::CommonSettingsChanged( bool aEnvVarsChanged )
{ {
SCH_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged ); SCH_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged );
GetCanvas()->GetGAL()->SetAxesColor( m_colorSettings->GetColor( LAYER_SCHEMATIC_GRID_AXES ) );
RecreateToolbars(); RecreateToolbars();
if( aEnvVarsChanged ) if( aEnvVarsChanged )
@ -931,6 +933,7 @@ void LIB_EDIT_FRAME::SwitchCanvas( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType )
// Set options specific to symbol editor (axies are always enabled): // Set options specific to symbol editor (axies are always enabled):
GetCanvas()->GetGAL()->SetAxesEnabled( true ); GetCanvas()->GetGAL()->SetAxesEnabled( true );
GetCanvas()->GetGAL()->SetAxesColor( m_colorSettings->GetColor( LAYER_SCHEMATIC_GRID_AXES ) );
} }

View File

@ -263,6 +263,7 @@ enum SCH_LAYER_ID: int
LAYER_DEVICE_BACKGROUND, LAYER_DEVICE_BACKGROUND,
LAYER_SHEET_BACKGROUND, LAYER_SHEET_BACKGROUND,
LAYER_SCHEMATIC_GRID, LAYER_SCHEMATIC_GRID,
LAYER_SCHEMATIC_GRID_AXES,
LAYER_SCHEMATIC_BACKGROUND, LAYER_SCHEMATIC_BACKGROUND,
LAYER_SCHEMATIC_CURSOR, LAYER_SCHEMATIC_CURSOR,
LAYER_BRIGHTENED, LAYER_BRIGHTENED,