← Back to team overview

kicad-developers team mailing list archive

[PATCH] Allow changing LAYER_PADS color and visibility (Fixes lp:1672646)

 

Hi all,

This adds LAYER_PADS to the render settings that are accessible to the
user, meaning you can change the color or hide this layer now.

Best,
Jon
From 9999f4fe87ffcbfaed7a0a23cba54d3e126dfe5c Mon Sep 17 00:00:00 2001
From: Jon Evans <jon@xxxxxxxxxxxxx>
Date: Mon, 27 Nov 2017 20:20:00 -0500
Subject: [PATCH] Allow changing LAYER_PADS color and visibility (Fixes
 lp:1672646)

---
 common/class_colors_design_settings.cpp | 6 ++++--
 pcbnew/class_pcb_layer_widget.cpp       | 1 +
 pcbnew/pcb_painter.cpp                  | 3 +--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/common/class_colors_design_settings.cpp b/common/class_colors_design_settings.cpp
index b030c072b..4060ce163 100644
--- a/common/class_colors_design_settings.cpp
+++ b/common/class_colors_design_settings.cpp
@@ -85,8 +85,10 @@ static const EDA_COLOR_T default_items_color[] = {
     DARKGRAY,  // LAYER_GRID
     LIGHTRED,  // LAYER_GRID_AXES
     BLUE,      // LAYER_NO_CONNECTS
-    LIGHTGRAY, LIGHTGRAY,
-    LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY,
+    LIGHTGRAY, LIGHTGRAY,   // LAYER_MOD_FR, LAYER_MOD_BK
+    LIGHTGRAY, LIGHTGRAY,   // LAYER_MOD_VALUES, LAYER_MOD_REFERENCES
+    LIGHTGRAY, // LAYER_TRACKS
+    YELLOW,    // LAYER_PADS
     LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY,
     LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY,
     LIGHTGRAY, LIGHTGRAY, LIGHTGRAY
diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp
index a5b44b163..bfc473734 100644
--- a/pcbnew/class_pcb_layer_widget.cpp
+++ b/pcbnew/class_pcb_layer_widget.cpp
@@ -63,6 +63,7 @@ const LAYER_WIDGET::ROW PCB_LAYER_WIDGET::s_render_rows[] = {
     RR( _( "Bl/Buried Via" ),   LAYER_VIA_BBLIND,     WHITE,    _( "Show blind or buried vias" )  ),
     RR( _( "Micro Via" ),       LAYER_VIA_MICROVIA,   WHITE,    _( "Show micro vias") ),
     RR( _( "Non Plated Holes" ),LAYER_NON_PLATED,     WHITE,    _( "Show non plated holes in specific color") ),
+    RR( _( "Plated Holes" ),    LAYER_PADS,           YELLOW,   _( "Show plated holes in specific color") ),
     RR( _( "Ratsnest" ),        LAYER_RATSNEST,       WHITE,    _( "Show unconnected nets as a ratsnest") ),
 
     RR( _( "No-Connects" ),     LAYER_NO_CONNECTS,    BLUE,     _( "Show a marker on pads which have no net connected" ) ),
diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp
index d4a86c332..8f56d1baa 100644
--- a/pcbnew/pcb_painter.cpp
+++ b/pcbnew/pcb_painter.cpp
@@ -90,13 +90,12 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( const COLORS_DESIGN_SETTINGS* aSet
     // Default colors for specific layers (not really board layers).
     m_layerColors[LAYER_VIAS_HOLES]         = COLOR4D( 0.5, 0.4, 0.0, 0.8 );
     m_layerColors[LAYER_PADS_HOLES]         = COLOR4D( 0.0, 0.0, 0.0, 1.0 );
-    m_layerColors[LAYER_PADS]               = COLOR4D( 0.6, 0.6, 0.0, 0.8 );
     m_layerColors[LAYER_PADS_NETNAMES]      = COLOR4D( 1.0, 1.0, 1.0, 0.9 );
     m_layerColors[LAYER_PAD_FR_NETNAMES]    = COLOR4D( 1.0, 1.0, 1.0, 0.9 );
     m_layerColors[LAYER_PAD_BK_NETNAMES]    = COLOR4D( 1.0, 1.0, 1.0, 0.9 );
     m_layerColors[LAYER_DRC]                = COLOR4D( 1.0, 0.0, 0.0, 0.8 );
 
-    // LAYER_NON_PLATED, LAYER_ANCHOR],LAYER_RATSNEST,
+    // LAYER_PADS, LAYER_NON_PLATED, LAYER_ANCHOR],LAYER_RATSNEST,
     // LAYER_VIA_THROUGH], LAYER_VIA_BBLIND, LAYER_VIA_MICROVIA
     // are initialized from aSettings
 
-- 
2.14.1


Follow ups