Make no-connects (and dangling symbols) more visible.

Fixes https://gitlab.com/kicad/code/kicad/issues/5329
This commit is contained in:
Jeff Young 2020-08-25 13:46:16 +01:00
parent 1138c32bf3
commit d02ce77bee
3 changed files with 11 additions and 4 deletions

View File

@ -34,7 +34,7 @@
#include <common.h> #include <common.h>
#include <plotter.h> #include <plotter.h>
#include <bitmaps.h> #include <bitmaps.h>
#include <schematic.h>
#include <sch_no_connect.h> #include <sch_no_connect.h>
#include <netlist_object.h> #include <netlist_object.h>
#include <settings/color_settings.h> #include <settings/color_settings.h>
@ -97,7 +97,7 @@ void SCH_NO_CONNECT::GetEndPoints( std::vector< DANGLING_END_ITEM >& aItemList )
int SCH_NO_CONNECT::GetPenWidth() const int SCH_NO_CONNECT::GetPenWidth() const
{ {
return 1; return std::max( Schematic()->Settings().m_DefaultLineWidth, 1 );
} }

View File

@ -730,7 +730,8 @@ void SCH_PAINTER::drawPinDanglingSymbol( const VECTOR2I& aPos, bool aDrawingShad
{ {
m_gal->SetIsFill( false ); m_gal->SetIsFill( false );
m_gal->SetIsStroke( true ); 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 ); 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->SetIsStroke( true );
m_gal->SetIsFill( false ); 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 ); m_gal->DrawRectangle( aPos - radius, aPos + radius );
} }

View File

@ -96,6 +96,11 @@ public:
m_layerColors[ LAYER_SCHEMATIC_BACKGROUND ] = aColor; 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& GetGridColor() override { return m_layerColors[ LAYER_SCHEMATIC_GRID ]; }
const COLOR4D& GetCursorColor() override { return m_layerColors[ LAYER_SCHEMATIC_CURSOR ]; } const COLOR4D& GetCursorColor() override { return m_layerColors[ LAYER_SCHEMATIC_CURSOR ]; }