← Back to team overview

kicad-developers team mailing list archive

Re: [FEATURE] Eeschema Line Styles

 

Hi Fabrizio-

Good call.  Attached is a patch to do this.

Chris, I am unable to re-create your issue.  Can you send along more
information about your system?

-Seth

On Thu, Nov 16, 2017 at 10:41 AM, Fabrizio Tappero <
fabrizio.tappero@xxxxxxxxx> wrote:

> Hi Seth,
> Thanks a lot for this! I will definetly use it a lot!
>
> Maybe millimeters should be mm?
>
> Cheers
> Fabrizio
>
>
> On Nov 15, 2017 2:18 PM, "jp charras" <jp.charras@xxxxxxxxxx> wrote:
>
> Le 15/11/2017 à 01:27, Seth Hillbrand a écrit :
> > Attached is the updated line styles patchset.  This implements the
> COLOR4D_PICKER_DIALOG and ensures
> > that the alpha channel remains opaque.
> >
> > The dotted line, I agree doesn't look too dotted.  This is the wxDOT
> style but apparently, it
> > doesn't account for the line caps.  I've replaced this with a
> user-defined dotted line.  This is the
> > smallest length of dot that we are allowed in wx.  Better than the
> default even if it isn't quite
> > "dotted".
> >
> > -Seth
> >
>
> Thanks.
>
> I committed your patch.
>
> I also modified the way the style parameters are stored in files, because
> the style was not very
> user readable, and did not work in some non English countries.
>
> --
> Jean-Pierre CHARRAS
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
>
From 06238cab2407660accc37164077cb81206c15756 Mon Sep 17 00:00:00 2001
From: Seth Hillbrand <hillbrand@xxxxxxxxxxx>
Date: Thu, 16 Nov 2017 15:56:41 -0800
Subject: [PATCH] Eeschema: Show abbreviated units

CHANGED: Edit Line Style shows "in" and "mm" instead of full word
---
 eeschema/dialogs/dialog_edit_line_style_base.cpp | 4 ++--
 eeschema/dialogs/dialog_edit_line_style_base.fbp | 4 ++--
 eeschema/dialogs/dialog_edit_line_style_base.h   | 8 +++-----
 eeschema/sch_line.cpp                            | 2 +-
 4 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/eeschema/dialogs/dialog_edit_line_style_base.cpp b/eeschema/dialogs/dialog_edit_line_style_base.cpp
index 1503c9d4f..e33b74aa6 100644
--- a/eeschema/dialogs/dialog_edit_line_style_base.cpp
+++ b/eeschema/dialogs/dialog_edit_line_style_base.cpp
@@ -1,8 +1,8 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Aug  4 2017)
+// C++ code generated with wxFormBuilder (version Oct 30 2017)
 // http://www.wxformbuilder.org/
 //
-// PLEASE DO "NOT" EDIT THIS FILE!
+// PLEASE DO *NOT* EDIT THIS FILE!
 ///////////////////////////////////////////////////////////////////////////
 
 #include "dialog_edit_line_style_base.h"
diff --git a/eeschema/dialogs/dialog_edit_line_style_base.fbp b/eeschema/dialogs/dialog_edit_line_style_base.fbp
index 867d305d8..de5cec913 100644
--- a/eeschema/dialogs/dialog_edit_line_style_base.fbp
+++ b/eeschema/dialogs/dialog_edit_line_style_base.fbp
@@ -44,7 +44,7 @@
             <property name="minimum_size"></property>
             <property name="name">DIALOG_EDIT_LINE_STYLE_BASE</property>
             <property name="pos"></property>
-            <property name="size">417,204</property>
+            <property name="size">298,204</property>
             <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
             <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
             <property name="title">Line Style</property>
@@ -250,7 +250,7 @@
                                                 <property name="maximize_button">0</property>
                                                 <property name="maximum_size"></property>
                                                 <property name="maxlength">0</property>
-                                                <property name="min_size">50,-1</property>
+                                                <property name="min_size">20,-1</property>
                                                 <property name="minimize_button">0</property>
                                                 <property name="minimum_size">80,-1</property>
                                                 <property name="moveable">1</property>
diff --git a/eeschema/dialogs/dialog_edit_line_style_base.h b/eeschema/dialogs/dialog_edit_line_style_base.h
index f9260b2d2..062a94d4e 100644
--- a/eeschema/dialogs/dialog_edit_line_style_base.h
+++ b/eeschema/dialogs/dialog_edit_line_style_base.h
@@ -1,8 +1,8 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Aug  4 2017)
+// C++ code generated with wxFormBuilder (version Oct 30 2017)
 // http://www.wxformbuilder.org/
 //
-// PLEASE DO "NOT" EDIT THIS FILE!
+// PLEASE DO *NOT* EDIT THIS FILE!
 ///////////////////////////////////////////////////////////////////////////
 
 #ifndef __DIALOG_EDIT_LINE_STYLE_BASE_H__
@@ -11,8 +11,6 @@
 #include <wx/artprov.h>
 #include <wx/xrc/xmlres.h>
 #include <wx/intl.h>
-class DIALOG_SHIM;
-
 #include "dialog_shim.h"
 #include <wx/string.h>
 #include <wx/stattext.h>
@@ -73,7 +71,7 @@ class DIALOG_EDIT_LINE_STYLE_BASE : public DIALOG_SHIM
 	public:
 		bool m_isValid; 
 		
-		DIALOG_EDIT_LINE_STYLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Line Style"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 417,204 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); 
+		DIALOG_EDIT_LINE_STYLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Line Style"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 298,204 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); 
 		~DIALOG_EDIT_LINE_STYLE_BASE();
 	
 };
diff --git a/eeschema/sch_line.cpp b/eeschema/sch_line.cpp
index 7f868259f..4391ceb9c 100644
--- a/eeschema/sch_line.cpp
+++ b/eeschema/sch_line.cpp
@@ -783,7 +783,7 @@ int SCH_EDIT_FRAME::EditLine( SCH_LINE* aLine, bool aRedraw )
         return wxID_CANCEL;
 
     DIALOG_EDIT_LINE_STYLE dlg( this );
-    wxString units = GetUnitsLabel( g_UserUnit );
+    wxString units = GetAbbreviatedUnitsLabel( g_UserUnit );
     int old_style = aLine->GetLineStyle();
     int old_width = aLine->GetPenSize();
     COLOR4D old_color = aLine->GetLineColor();
-- 
2.11.0


Follow ups

References