Browse Source

Add user-configurability of the LibEdit axes color.

pull/16/head
Jeff Young 6 years ago
parent
commit
c4aed3a8de
  1. 3
      common/layer_id.cpp
  2. 1
      common/settings/color_settings.cpp
  3. 3
      eeschema/libedit/lib_edit_frame.cpp
  4. 1
      include/layers_id_colors_and_visibility.h

3
common/layer_id.cpp

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

1
common/settings/color_settings.cpp

@ -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.fields", LAYER_FIELDS, COLOR4D( MAGENTA ) );
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.junction", LAYER_JUNCTION, COLOR4D( GREEN ) );
CLR( "schematic.label_global", LAYER_GLOBLABEL, COLOR4D( RED ) );

3
eeschema/libedit/lib_edit_frame.cpp

@ -790,6 +790,8 @@ void LIB_EDIT_FRAME::CommonSettingsChanged( bool aEnvVarsChanged )
{
SCH_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged );
GetCanvas()->GetGAL()->SetAxesColor( m_colorSettings->GetColor( LAYER_SCHEMATIC_GRID_AXES ) );
RecreateToolbars();
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):
GetCanvas()->GetGAL()->SetAxesEnabled( true );
GetCanvas()->GetGAL()->SetAxesColor( m_colorSettings->GetColor( LAYER_SCHEMATIC_GRID_AXES ) );
}

1
include/layers_id_colors_and_visibility.h

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

Loading…
Cancel
Save