kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #06844
[PATCH] fix eeschema erc icon pyramid and some eeschema toolbar stuff
This patch does:
- fix a nasty problem with the eeschema larger icons erc menu
- fix one erc icon problem
- makes all icon toolbars in eeschema little narrower (better for
smaller monitors) adding the possibility of playing around with icon
margins, line 143 of paddieeschema/tool_sch.cpp
- fix some minor things
I seem to understand that the icon hovering effect is not set and is
therefore left to Wx which it should set it in a coherent manner
according to the operating system. In my Ubuntu this does not happen
because the default gnome icon hovering is not this light blue thing
that KiCad seems to have now. Can anybody share some thoughts on this
matter? I tihnk that ideally we would like to have a hovering effect
similar to Libreoffice, yes?
cheers
Fabrizio
=== modified file 'bitmaps_png/CMakeLists.txt'
--- bitmaps_png/CMakeLists.txt 2011-09-08 20:27:02 +0000
+++ bitmaps_png/CMakeLists.txt 2011-09-09 14:07:41 +0000
@@ -197,7 +197,6 @@
erc_green
ercwarn
erc
- error
exit
export_footprint_names
export_module
=== modified file 'bitmaps_png/sources/ercwarn.svg'
--- bitmaps_png/sources/ercwarn.svg 2011-09-08 05:58:45 +0000
+++ bitmaps_png/sources/ercwarn.svg 2011-09-09 14:36:06 +0000
@@ -1,12 +1,103 @@
-<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48" version="1.0">
- <defs>
- <filter id="a" color-interpolation-filters="sRGB">
- <feGaussianBlur stdDeviation="0.7125797"/>
- </filter>
- </defs>
- <g transform="matrix(1.2114,0,0,1.1636,-5.3855,-4.35)">
- <rect stroke-linejoin="round" fill-rule="evenodd" rx=".72608" ry="1.3898" height="34.248" width="33.268" stroke="#78781e" y="7.1759" x="7.775" stroke-width="1.5056" fill="#fdfd40"/>
- <text opacity=".80078" style="word-spacing:0px;letter-spacing:0px" xml:space="preserve" transform="matrix(.85154 0 0 .88026 6.6875 11.812)" line-height="125%" filter="url(#a)" font-size="36.4px" y="29.40612" x="6.1734886" font-family="Sans" fill="#000000"><tspan font-family="UnDotum" y="29.40612" x="6.1734886" font-weight="bold" fill="#000000">W</tspan></text>
- <text style="word-spacing:0px;letter-spacing:0px" xml:space="preserve" transform="scale(.98355 1.0167)" line-height="125%" font-size="31.515px" y="35.885643" x="10.682997" font-family="Sans" fill="#ffffff"><tspan font-family="UnDotum" y="35.885643" x="10.682997" font-weight="bold" fill="#ffffff">W</tspan></text>
- </g>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ height="48"
+ width="48"
+ version="1.0"
+ id="svg2"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="ercwarn.svg">
+ <metadata
+ id="metadata23">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1280"
+ inkscape:window-height="949"
+ id="namedview21"
+ showgrid="false"
+ inkscape:zoom="4.9166667"
+ inkscape:cx="24"
+ inkscape:cy="23.59322"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <defs
+ id="defs4">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 24 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="48 : 24 : 1"
+ inkscape:persp3d-origin="24 : 16 : 1"
+ id="perspective25" />
+ <filter
+ id="a"
+ color-interpolation-filters="sRGB">
+ <feGaussianBlur
+ stdDeviation="0.7125797"
+ id="feGaussianBlur7" />
+ </filter>
+ </defs>
+ <rect
+ style="fill:#fdfd40;fill-rule:evenodd;stroke:#78781e;stroke-width:1.78753781;stroke-linejoin:round"
+ id="rect11"
+ x="4.0331349"
+ y="3.9998772"
+ width="40.300858"
+ height="39.850975"
+ ry="1.6171712"
+ rx="0.87957329" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text13"
+ x="6.1734886"
+ y="29.40612"
+ font-size="36.4px"
+ line-height="125%"
+ transform="matrix(1.0315556,0,0,1.0242705,1.6987885,8.9876636)"
+ xml:space="preserve"
+ style="font-size:36.40000153px;line-height:125%;letter-spacing:0px;word-spacing:0px;opacity:0.80077999;fill:#000000;filter:url(#a);font-family:Sans"><tspan
+ style="font-weight:bold;fill:#000000;font-family:UnDotum"
+ id="tspan15"
+ font-weight="bold"
+ x="6.1734886"
+ y="29.40612">W</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text17"
+ x="6.3035998"
+ y="37.831326"
+ font-size="31.515px"
+ line-height="125%"
+ transform="scale(1.0035609,0.99645173)"
+ xml:space="preserve"
+ style="font-size:37.41601944px;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;font-family:Sans"><tspan
+ style="font-weight:bold;fill:#ffffff;font-family:UnDotum"
+ id="tspan19"
+ font-weight="bold"
+ x="6.3035998"
+ y="37.831326">W</tspan></text>
</svg>
=== removed file 'bitmaps_png/sources/error.svg'
--- bitmaps_png/sources/error.svg 2011-09-08 05:58:45 +0000
+++ bitmaps_png/sources/error.svg 1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48" version="1.0">
- <defs>
- <filter id="a" color-interpolation-filters="sRGB">
- <feGaussianBlur stdDeviation="0.7125797"/>
- </filter>
- </defs>
- <g transform="matrix(1.2114,0,0,1.1636,-5.3855,-4.35)">
- <rect stroke-linejoin="round" fill-rule="evenodd" rx=".72608" ry="1.3898" height="34.248" width="33.268" stroke="#78781e" y="7.1759" x="7.775" stroke-width="1.5056" fill="#fdfd40"/>
- <text opacity=".80078" style="word-spacing:0px;letter-spacing:0px" xml:space="preserve" transform="matrix(.85154 0 0 .88026 6.6875 11.812)" line-height="125%" filter="url(#a)" font-size="36.4px" y="29.40612" x="6.1734886" font-family="Sans" fill="#000000"><tspan font-family="UnDotum" y="29.40612" x="6.1734886" font-weight="bold" fill="#000000">W</tspan></text>
- <text style="word-spacing:0px;letter-spacing:0px" xml:space="preserve" transform="scale(.98355 1.0167)" line-height="125%" font-size="31.515px" y="35.885643" x="10.682997" font-family="Sans" fill="#ffffff"><tspan font-family="UnDotum" y="35.885643" x="10.682997" font-weight="bold" fill="#ffffff">W</tspan></text>
- </g>
-</svg>
=== modified file 'eeschema/dialogs/dialog_erc.cpp'
--- eeschema/dialogs/dialog_erc.cpp 2011-09-06 14:09:40 +0000
+++ eeschema/dialogs/dialog_erc.cpp 2011-09-09 15:01:37 +0000
@@ -186,7 +186,7 @@
int ii, jj, event_id, text_height;
wxPoint pos, BoxMatrixPosition;
-#define BITMAP_SIZE 19
+ #define BITMAP_SIZE 35
int bitmap_size = BITMAP_SIZE;
wxStaticText* text;
int x, y;
@@ -225,6 +225,7 @@
for( ii = 0; ii < PIN_NMAX; ii++ )
{
y = pos.y + (ii * bitmap_size);
+ y = y + 10;
text = new wxStaticText( m_PanelERCOptions, -1, CommentERC_H[ii],
wxPoint( 5, y ) );
@@ -247,8 +248,8 @@
if( (ii == jj) && !m_Initialized )
{
wxPoint txtpos;
- txtpos.x = x + 6;
- txtpos.y = y - bitmap_size;
+ txtpos.x = x + 50;
+ txtpos.y = y + 10;
text = new wxStaticText( m_PanelERCOptions,
-1,
CommentERC_V[ii],
@@ -273,7 +274,7 @@
case WAR:
m_ButtonList[ii][jj] = new wxBitmapButton( m_PanelERCOptions,
event_id,
- KiBitmap( warning_xpm ),
+ KiBitmap( ercwarn_xpm ),
wxPoint( x, y ) );
break;
@@ -281,7 +282,7 @@
case ERR:
m_ButtonList[ii][jj] = new wxBitmapButton( m_PanelERCOptions,
event_id,
- KiBitmap( error_xpm ),
+ KiBitmap( ercerr_xpm ),
wxPoint( x, y ) );
break;
@@ -362,12 +363,12 @@
{
case OK:
level = WAR;
- new_bitmap_xpm = warning_xpm;
+ new_bitmap_xpm = ercwarn_xpm;
break;
case WAR:
level = ERR;
- new_bitmap_xpm = error_xpm;
+ new_bitmap_xpm = ercerr_xpm;
break;
case ERR:
=== modified file 'eeschema/tool_sch.cpp'
--- eeschema/tool_sch.cpp 2011-09-08 06:20:13 +0000
+++ eeschema/tool_sch.cpp 2011-09-09 15:55:41 +0000
@@ -139,6 +139,11 @@
m_HToolBar->AddTool( ID_BACKANNO_ITEMS, wxEmptyString, KiBitmap( import_footprint_names_xpm ),
_( "Back annotate component foot prints" ) );
+ // set icon paddings
+ m_HToolBar->SetToolBorderPadding(3); // padding
+ m_HToolBar->SetToolSeparation(0);
+ //m_HToolBar->SetMargins(0,1); // margins width and height
+
// after adding the tools to the toolbar, must call Realize() to reflect the changes
m_HToolBar->Realize();
}
@@ -219,6 +224,11 @@
m_VToolBar->AddTool( ID_SCHEMATIC_DELETE_ITEM_BUTT, wxEmptyString, KiBitmap( delete_body_xpm ),
HELP_DELETE_ITEMS, wxITEM_CHECK );
+ // set icon paddings
+ m_VToolBar->SetToolBorderPadding(2); // padding
+ m_VToolBar->SetToolSeparation(0);
+ //m_VToolBar->SetMargins(1,0); // margins width and height
+
m_VToolBar->Realize();
}
@@ -248,17 +258,21 @@
KiBitmap( cursor_shape_xpm ),
_( "Change cursor shape" ), wxITEM_CHECK );
- m_OptionsToolBar->AddSeparator();
+ //m_OptionsToolBar->AddSeparator();
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_HIDDEN_PINS, wxEmptyString,
KiBitmap( hidden_pin_xpm ),
_( "Show hidden pins" ), wxITEM_CHECK );
- m_OptionsToolBar->AddSeparator();
+ //m_OptionsToolBar->AddSeparator();
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_BUS_WIRES_ORIENT, wxEmptyString,
KiBitmap( lines90_xpm ),
_( "HV orientation for wires and bus" ),
wxITEM_CHECK );
-
+ // set icon paddings
+ m_OptionsToolBar->SetToolBorderPadding(2); // padding
+ m_OptionsToolBar->SetToolSeparation(0);
+ //m_OptionsToolBar->SetMargins(4,0); // margins width and height
+
m_OptionsToolBar->Realize();
}
=== modified file 'include/bitmaps.h'
--- include/bitmaps.h 2011-09-08 20:27:02 +0000
+++ include/bitmaps.h 2011-09-09 14:11:16 +0000
@@ -171,8 +171,9 @@
EXTERN_BITMAP( eeschema_xpm )
EXTERN_BITMAP( enter_sheet_xpm )
EXTERN_BITMAP( erc_xpm )
+EXTERN_BITMAP( ercerr_xpm )
+EXTERN_BITMAP( ercwarn_xpm )
EXTERN_BITMAP( erc_green_xpm )
-EXTERN_BITMAP( error_xpm )
EXTERN_BITMAP( exit_xpm )
EXTERN_BITMAP( export_footprint_names_xpm )
EXTERN_BITMAP( export_module_xpm )
Follow ups