From d02ce77beee54aed4d61e5546787ad1c482b30cf Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 25 Aug 2020 13:46:16 +0100 Subject: [PATCH] Make no-connects (and dangling symbols) more visible. Fixes https://gitlab.com/kicad/code/kicad/issues/5329 --- eeschema/sch_no_connect.cpp | 4 ++-- eeschema/sch_painter.cpp | 6 ++++-- eeschema/sch_painter.h | 5 +++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/eeschema/sch_no_connect.cpp b/eeschema/sch_no_connect.cpp index 2fff2e9ae5..0d41ef5aa4 100644 --- a/eeschema/sch_no_connect.cpp +++ b/eeschema/sch_no_connect.cpp @@ -34,7 +34,7 @@ #include #include #include - +#include #include #include #include @@ -97,7 +97,7 @@ void SCH_NO_CONNECT::GetEndPoints( std::vector< DANGLING_END_ITEM >& aItemList ) int SCH_NO_CONNECT::GetPenWidth() const { - return 1; + return std::max( Schematic()->Settings().m_DefaultLineWidth, 1 ); } diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index 595186f5fc..9a510892df 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -730,7 +730,8 @@ void SCH_PAINTER::drawPinDanglingSymbol( const VECTOR2I& aPos, bool aDrawingShad { m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); - m_gal->SetLineWidth( aDrawingShadows ? getShadowWidth() : 1.0F ); + m_gal->SetLineWidth( aDrawingShadows ? getShadowWidth() + : m_schSettings.GetDanglineSymbolThickness() ); m_gal->DrawCircle( aPos, TARGET_PIN_RADIUS ); } @@ -1169,7 +1170,8 @@ void SCH_PAINTER::drawDanglingSymbol( const wxPoint& aPos, int aWidth, bool aDra m_gal->SetIsStroke( true ); m_gal->SetIsFill( false ); - m_gal->SetLineWidth( aDrawingShadows ? getShadowWidth() : 1.0F ); + m_gal->SetLineWidth( aDrawingShadows ? getShadowWidth() + : m_schSettings.GetDanglineSymbolThickness() ); m_gal->DrawRectangle( aPos - radius, aPos + radius ); } diff --git a/eeschema/sch_painter.h b/eeschema/sch_painter.h index 864eb0b3eb..03ed5b6e5b 100644 --- a/eeschema/sch_painter.h +++ b/eeschema/sch_painter.h @@ -96,6 +96,11 @@ public: m_layerColors[ LAYER_SCHEMATIC_BACKGROUND ] = aColor; } + float GetDanglineSymbolThickness() + { + return (float) m_defaultPenWidth / 3.0F; + } + const COLOR4D& GetGridColor() override { return m_layerColors[ LAYER_SCHEMATIC_GRID ]; } const COLOR4D& GetCursorColor() override { return m_layerColors[ LAYER_SCHEMATIC_CURSOR ]; }