diff --git a/eeschema/dialogs/panel_eeschema_display_options.cpp b/eeschema/dialogs/panel_eeschema_display_options.cpp
index 36a58a1e4c..88d23ddbe3 100644
--- a/eeschema/dialogs/panel_eeschema_display_options.cpp
+++ b/eeschema/dialogs/panel_eeschema_display_options.cpp
@@ -81,6 +81,7 @@ bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataToWindow()
m_checkSelTextBox->SetValue( GetSelectionTextAsBox() );
m_checkSelDrawChildItems->SetValue( GetSelectionDrawChildItems() );
m_checkSelFillShapes->SetValue( GetSelectionFillShapes() );
+ m_selWidthCtrl->SetValue( GetSelectionThickness() );
m_galOptsPanel->TransferDataToWindow();
@@ -120,6 +121,7 @@ bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow()
SetSelectionTextAsBox( m_checkSelTextBox->GetValue() );
SetSelectionDrawChildItems( m_checkSelDrawChildItems->GetValue() );
SetSelectionFillShapes( m_checkSelFillShapes->GetValue() );
+ SetSelectionThickness( m_selWidthCtrl->GetValue() );
// Update canvas
m_frame->GetRenderSettings()->m_ShowHiddenPins = m_checkShowHiddenPins->GetValue();
diff --git a/eeschema/dialogs/panel_eeschema_display_options_base.cpp b/eeschema/dialogs/panel_eeschema_display_options_base.cpp
index ec9235b44b..71d76ce55c 100644
--- a/eeschema/dialogs/panel_eeschema_display_options_base.cpp
+++ b/eeschema/dialogs/panel_eeschema_display_options_base.cpp
@@ -117,6 +117,23 @@ PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE( wxWind
m_checkSelFillShapes = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Fill selected shapes"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer3->Add( m_checkSelFillShapes, 0, wxALL|wxEXPAND, 5 );
+ wxFlexGridSizer* fgSizer321;
+ fgSizer321 = new wxFlexGridSizer( 0, 2, 3, 0 );
+ fgSizer321->AddGrowableCol( 1 );
+ fgSizer321->SetFlexibleDirection( wxBOTH );
+ fgSizer321->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_selWidthLabel = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("&Highlight thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_selWidthLabel->Wrap( -1 );
+ fgSizer321->Add( m_selWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
+
+ m_selWidthCtrl = new wxSpinCtrlDouble( sbSizer3->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0.5, 50, 0, 0.5 );
+ m_selWidthCtrl->SetDigits( 1 );
+ fgSizer321->Add( m_selWidthCtrl, 0, wxEXPAND, 5 );
+
+
+ sbSizer3->Add( fgSizer321, 1, wxEXPAND|wxTOP, 5 );
+
bRightColumn->Add( sbSizer3, 1, wxEXPAND|wxTOP, 5 );
diff --git a/eeschema/dialogs/panel_eeschema_display_options_base.fbp b/eeschema/dialogs/panel_eeschema_display_options_base.fbp
index 2b43779b8b..a56ea2ed83 100644
--- a/eeschema/dialogs/panel_eeschema_display_options_base.fbp
+++ b/eeschema/dialogs/panel_eeschema_display_options_base.fbp
@@ -1220,6 +1220,149 @@
+
diff --git a/eeschema/dialogs/panel_eeschema_display_options_base.h b/eeschema/dialogs/panel_eeschema_display_options_base.h
index 2505495cb5..41d5874a14 100644
--- a/eeschema/dialogs/panel_eeschema_display_options_base.h
+++ b/eeschema/dialogs/panel_eeschema_display_options_base.h
@@ -21,6 +21,7 @@
#include
#include
#include
+#include
#include
///////////////////////////////////////////////////////////////////////////
@@ -51,6 +52,8 @@ class PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE : public wxPanel
wxCheckBox* m_checkSelTextBox;
wxCheckBox* m_checkSelDrawChildItems;
wxCheckBox* m_checkSelFillShapes;
+ wxStaticText* m_selWidthLabel;
+ wxSpinCtrlDouble* m_selWidthCtrl;
public:
diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp
index c3dc271d76..10a9892faa 100644
--- a/eeschema/eeschema_config.cpp
+++ b/eeschema/eeschema_config.cpp
@@ -55,7 +55,7 @@ static int s_textMarkupFlags = 0;
static bool s_selectTextAsBox = false;
static bool s_selectDrawChildren = true;
static bool s_selectFillShapes = false;
-
+static float s_selectThickness = DEFAULTSELECTIONTHICKNESS;
int GetDefaultBusThickness()
{
@@ -153,6 +153,17 @@ void SetSelectionFillShapes( bool aBool )
}
+float GetSelectionThickness()
+{
+ return s_selectThickness;
+}
+
+
+void SetSelectionThickness( float aFloat )
+{
+ s_selectThickness = aFloat;
+}
+
// Color to draw selected items
COLOR4D GetItemSelectedColor()
{
@@ -326,6 +337,7 @@ static const wxChar showPinElectricalType[] = wxT( "LibeditShowPinElectric
static const wxChar boxedSelectedText[] = wxT( "SelectionTextAsBox" );
static const wxChar drawSelectedChildren[] = wxT( "SelectionDrawChildItems" );
static const wxChar selectionFillShapes[] = wxT( "SelectionFillShapes" );
+static const wxChar selectionThickness[] = wxT( "SelectionThickness" );
///@}
@@ -388,6 +400,8 @@ void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
SetSelectionTextAsBox( aCfg->ReadBool( boxedSelectedText, false ) );
SetSelectionDrawChildItems( aCfg->ReadBool( drawSelectedChildren, true ) );
SetSelectionFillShapes( aCfg->ReadBool( selectionFillShapes, false ) );
+ SetSelectionThickness(
+ (float) aCfg->ReadDouble( selectionThickness, DEFAULTSELECTIONTHICKNESS ) );
SetTextMarkupFlags( (int) aCfg->Read( TextMarkupFlagsEntry, 0L ) );
@@ -447,6 +461,7 @@ void SCH_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
aCfg->Write( boxedSelectedText, GetSelectionTextAsBox() );
aCfg->Write( drawSelectedChildren, GetSelectionDrawChildItems() );
aCfg->Write( selectionFillShapes, GetSelectionFillShapes() );
+ aCfg->Write( selectionThickness, GetSelectionThickness() );
// Save template fieldnames
STRING_FORMATTER sf;
diff --git a/eeschema/general.h b/eeschema/general.h
index 029ce6e087..d302c798d4 100644
--- a/eeschema/general.h
+++ b/eeschema/general.h
@@ -72,6 +72,9 @@ class SCH_SHEET_PATH;
///< The default library pane width
#define DEFAULTLIBWIDTH 250
+///< The default selection highlight thickness
+#define DEFAULTSELECTIONTHICKNESS 1.5
+
/* Rotation, mirror of graphic items in components bodies are handled by a
* transform matrix. The default matrix is useful to draw lib entries with
* using this default matrix ( no rotation, no mirror but Y axis is bottom to top, and
@@ -138,6 +141,11 @@ void SetSelectionDrawChildItems( bool aBool );
bool GetSelectionFillShapes();
void SetSelectionFillShapes( bool aBool );
+/**
+ * Selection highlight thickness
+ */
+float GetSelectionThickness();
+void SetSelectionThickness( float aFloat );
int GetTextMarkupFlags();
void SetTextMarkupFlags( int aMarkupFlags );
diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp
index 1c77b89da8..379875cf89 100644
--- a/eeschema/sch_painter.cpp
+++ b/eeschema/sch_painter.cpp
@@ -232,7 +232,8 @@ float SCH_PAINTER::getShadowWidth()
// For best visuals the selection width must be a cross between the zoom level and the
// default line width.
- return (float) ( ( fabs( matrix.GetScale().x * 5.5 ) + GetDefaultLineThickness() ) / 2.0 );
+ return (float) ( ( fabs( matrix.GetScale().x ) + GetDefaultLineThickness() )
+ * GetSelectionThickness() );
}