Commit 5861a43d authored by charras's avatar charras

Cosmetic enhancements.

patch for relative paths.
parent 9d400e4c
...@@ -126,6 +126,7 @@ set(BITMAP_SRCS ...@@ -126,6 +126,7 @@ set(BITMAP_SRCS
Export_Module.xpm Export_Module.xpm
Export_Options_Pad.xpm Export_Options_Pad.xpm
export.xpm export.xpm
fabrication.xpm
File_FootPrint.xpm File_FootPrint.xpm
fill_zone.xpm fill_zone.xpm
find_xpm.xpm find_xpm.xpm
...@@ -285,6 +286,7 @@ set(BITMAP_SRCS ...@@ -285,6 +286,7 @@ set(BITMAP_SRCS
Orient.xpm Orient.xpm
Pad_Sketch.xpm Pad_Sketch.xpm
pad.xpm pad.xpm
pads_mask_layers.xpm
palette.xpm palette.xpm
part_properties.xpm part_properties.xpm
paste.xpm paste.xpm
......
/* XPM */
const char *fabrication_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 16 16 1",
"- c #5D7FB0",
"O c #7493A6",
"& c #AFB6BF",
"X c #C2AA9C",
"# c #8B6C60",
"o c #8DA4BD",
"= c #94817F",
"$ c #69839C",
"% c #6C493D",
" c None",
"+ c #A78372",
"; c #4973A9",
"@ c #755A52",
". c #B6917F",
"* c #708EB8",
": c #3C6397",
/* pixels */
" ...X oO ",
" +@#X o$$$",
" +%. OOOO$",
"X.& &+%. $OO$ ",
".#+.+%%+ ooO*& ",
" +%%%%%%.ooO& ",
" &.=.=%%@oO ",
" &.@o$. ",
" &**$$%@. ",
" &**-;=@%@. ",
" o***;-&+@%#. ",
" **o*:;o +@%#. ",
"*o *:-o +@#+X",
"*o-:;* .==.",
"*-:;- .. ",
" *-- "
};
/* XPM */
const char *pads_mask_layers_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 16 16 1",
"= c #9E0808",
"- c #AC2A2C",
"X c #5E9A86",
"* c #782222",
"% c #54392C",
"$ c #B19D9F",
" c None",
"@ c #376836",
"o c #629B65",
": c #B48684",
"+ c #347E47",
"O c #3C8C57",
"# c #2E551D",
"; c #B46E6E",
". c #8FAD90",
"& c #4C5E44",
/* pixels */
" ",
" ",
" ....X ",
".XoXoooooooOo ",
".OoOOOOOOOOOo. ",
" O+++@@@@##@Oo ",
" X@#########+o. ",
" $O#########@Oo ",
" X@#########+o.",
" O######%#%&X ",
" X&%%%*****=$ ",
" $========-; ",
" ;;;:$ ",
" ",
" ",
" "
};
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<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"
width="210mm"
height="297mm"
id="svg2"
version="1.1"
inkscape:version="0.47 r22583"
sodipodi:docname="pads_mask_layers.svg"
inkscape:export-filename="F:\kicad-sourceforge\trunk\kicad\bitmaps\sources\pads_mask_layers.png"
inkscape:export-xdpi="3.638989"
inkscape:export-ydpi="3.638989">
<defs
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective10" />
<filter
id="filter2836"
inkscape:menu="Transparency utilities"
inkscape:label="Alpha repaint"
inkscape:menu-tooltip="Repaint anything monochrome">
<feFlood
id="feFlood2838"
flood-color="rgb(255,0,105)"
result="result1" />
<feComposite
id="feComposite2840"
in2="SourceGraphic"
operator="in"
result="result2" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="22.4"
inkscape:cx="146.09511"
inkscape:cy="834.95066"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1280"
inkscape:window-height="968"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g2830"
transform="matrix(0.04102564,0,0,0.04043321,118.50183,195.95055)">
<g
inkscape:export-ydpi="3.8497858"
inkscape:export-xdpi="3.8497858"
transform="matrix(1,0,0,1.4574528,0,-261.93189)"
id="g3756">
<rect
style="fill:#b00000;fill-opacity:1"
id="rect3750"
width="227.47855"
height="139.22588"
x="-126.96159"
y="510.54568"
transform="matrix(0.9976536,-0.06846385,0.58951154,0.80775995,0,0)" />
<rect
style="opacity:0.46153846;fill:#008080;fill-opacity:1"
id="rect3752"
width="287.80429"
height="136.86607"
x="-158.38127"
y="482.22855"
transform="matrix(0.9976536,-0.06846385,0.58951154,0.80775995,0,0)" />
<rect
style="opacity:0.46153846;fill:#008000;fill-opacity:1"
id="rect3754"
width="296.60181"
height="148.66492"
x="-143.29985"
y="455.09128"
transform="matrix(0.9976536,-0.06846385,0.58951154,0.80775995,0,0)" />
</g>
<rect
inkscape:export-ydpi="3.638989"
inkscape:export-xdpi="3.638989"
y="204.50505"
x="123.57143"
height="395.71429"
width="390"
id="rect3761"
style="opacity:0.07999998;fill:#000000;fill-opacity:1" />
</g>
</g>
</svg>
...@@ -297,6 +297,20 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertPath( wxCommandEvent& event ) ...@@ -297,6 +297,20 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertPath( wxCommandEvent& event )
if ( jj >= 0 ) if ( jj >= 0 )
ipos = jj; ipos = jj;
} }
// Ask the user if this is a relative path
int diag = wxMessageBox(
_( "Use a relative path?" ),
_( "Path type" ),
wxYES_NO | wxICON_QUESTION, this );
if( diag == wxYES )
{ // Make it relative
wxFileName fn = path;
fn.MakeRelativeTo( wxT(".") );
path = fn.GetPathWithSep() + fn.GetFullName();
}
m_listUserPaths->Insert(path, ipos); m_listUserPaths->Insert(path, ipos);
m_LibPathChanged = true; m_LibPathChanged = true;
wxGetApp().InsertLibraryPath( path, ipos+1 ); wxGetApp().InsertLibraryPath( path, ipos+1 );
......
...@@ -223,10 +223,10 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -223,10 +223,10 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
/* Zoom out */ /* Zoom out */
#if !defined( __WXMAC__) #if !defined( __WXMAC__)
text = AddHotkeyName( _( "Zoom Out\t" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Zoom Out" ), s_Schematic_Hokeys_Descr,
HK_ZOOM_OUT ); HK_ZOOM_OUT );
#else #else
text = _( "Zoom out\tCtrl+-" ); text = _( "Zoom Out\tCtrl+-" );
#endif /* !defined( __WXMAC__) */ #endif /* !defined( __WXMAC__) */
item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, _( "Zoom Out" ), item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, _( "Zoom Out" ),
......
...@@ -119,6 +119,7 @@ extern const char* exit_xpm[]; ...@@ -119,6 +119,7 @@ extern const char* exit_xpm[];
extern const char* export_module_xpm[]; extern const char* export_module_xpm[];
extern const char* export_options_pad_xpm[]; extern const char* export_options_pad_xpm[];
extern const char* export_xpm[]; extern const char* export_xpm[];
extern const char* fabrication_xpm[];
extern const char* file_footprint_xpm[]; extern const char* file_footprint_xpm[];
extern const char* fill_zone_xpm[]; extern const char* fill_zone_xpm[];
extern const char* find_xpm[]; extern const char* find_xpm[];
...@@ -277,6 +278,7 @@ extern const char* opt_show_polygon_xpm[]; ...@@ -277,6 +278,7 @@ extern const char* opt_show_polygon_xpm[];
extern const char* orient_xpm[]; extern const char* orient_xpm[];
extern const char* pad_sketch_xpm[]; extern const char* pad_sketch_xpm[];
extern const char* pad_xpm[]; extern const char* pad_xpm[];
extern const char* pads_mask_layers_xpm[];
extern const char* palette_xpm[]; extern const char* palette_xpm[];
extern const char* part_properties_xpm[]; extern const char* part_properties_xpm[];
extern const char* paste_xpm[]; extern const char* paste_xpm[];
......
No preview for this file type
This diff is collapsed.
...@@ -41,6 +41,12 @@ dialog_copper_zone::dialog_copper_zone( WinEDA_PcbFrame* parent, ZONE_SETTING* z ...@@ -41,6 +41,12 @@ dialog_copper_zone::dialog_copper_zone( WinEDA_PcbFrame* parent, ZONE_SETTING* z
} }
SetReturnCode( ZONE_ABORT ); // Will be changed on buttons click SetReturnCode( ZONE_ABORT ); // Will be changed on buttons click
if( GetSizer() )
{
GetSizer()->SetSizeHints( this );
}
Center();
} }
...@@ -198,11 +204,6 @@ void dialog_copper_zone::OnInitDialog( wxInitDialogEvent& event ) ...@@ -198,11 +204,6 @@ void dialog_copper_zone::OnInitDialog( wxInitDialogEvent& event )
} }
} }
} }
if( GetSizer() )
{
GetSizer()->SetSizeHints( this );
}
Center();
} }
......
...@@ -404,6 +404,22 @@ void DIALOG_MODULE_BOARD_EDITOR::Browse3DLib( wxCommandEvent& event ) ...@@ -404,6 +404,22 @@ void DIALOG_MODULE_BOARD_EDITOR::Browse3DLib( wxCommandEvent& event )
*/ */
shortfilename = shortfilename =
wxGetApp().ReturnFilenameWithRelativePathInLibPath( fullfilename ); wxGetApp().ReturnFilenameWithRelativePathInLibPath( fullfilename );
wxFileName aux = shortfilename;
if( aux.IsAbsolute() )
{ // Absolute path, ask if the user wants a relative one
int diag = wxMessageBox(
_( "Use a relative path?" ),
_( "Path type" ),
wxYES_NO | wxICON_QUESTION, this );
if( diag == wxYES )
{ // Make it relative
aux.MakeRelativeTo( wxT(".") );
shortfilename = aux.GetPathWithSep() + aux.GetFullName();
}
}
S3D_MASTER* new3DShape = new S3D_MASTER( NULL ); S3D_MASTER* new3DShape = new S3D_MASTER( NULL );
new3DShape->m_Shape3DName = shortfilename; new3DShape->m_Shape3DName = shortfilename;
m_Shapes3D_list.push_back( new3DShape ); m_Shapes3D_list.push_back( new3DShape );
......
...@@ -279,6 +279,22 @@ void DIALOG_MODULE_MODULE_EDITOR::Browse3DLib( wxCommandEvent& event ) ...@@ -279,6 +279,22 @@ void DIALOG_MODULE_MODULE_EDITOR::Browse3DLib( wxCommandEvent& event )
* because it preserve use of default libraries paths, when the path is a sub path of these default paths * because it preserve use of default libraries paths, when the path is a sub path of these default paths
*/ */
shortfilename = wxGetApp().ReturnFilenameWithRelativePathInLibPath( fullfilename ); shortfilename = wxGetApp().ReturnFilenameWithRelativePathInLibPath( fullfilename );
wxFileName aux = shortfilename;
if( aux.IsAbsolute() )
{ // Absolute path, ask if the user wants a relative one
int diag = wxMessageBox(
_( "Use a relative path?" ),
_( "Path type" ),
wxYES_NO | wxICON_QUESTION, this );
if( diag == wxYES )
{ // Make it relative
aux.MakeRelativeTo( wxT(".") );
shortfilename = aux.GetPathWithSep() + aux.GetFullName();
}
}
S3D_MASTER* new3DShape = new S3D_MASTER(NULL); S3D_MASTER* new3DShape = new S3D_MASTER(NULL);
new3DShape->m_Shape3DName = shortfilename; new3DShape->m_Shape3DName = shortfilename;
m_Shapes3D_list.push_back( new3DShape ); m_Shapes3D_list.push_back( new3DShape );
......
...@@ -24,6 +24,9 @@ Dialog_GeneralOptions::Dialog_GeneralOptions( WinEDA_PcbFrame* parent ) : ...@@ -24,6 +24,9 @@ Dialog_GeneralOptions::Dialog_GeneralOptions( WinEDA_PcbFrame* parent ) :
{ {
m_Parent = parent; m_Parent = parent;
init(); init();
GetSizer()->SetSizeHints( this );
Center();
} }
...@@ -65,11 +68,6 @@ void Dialog_GeneralOptions::init() ...@@ -65,11 +68,6 @@ void Dialog_GeneralOptions::init()
m_MagneticPadOptCtrl->SetSelection( g_MagneticPadOption ); m_MagneticPadOptCtrl->SetSelection( g_MagneticPadOption );
m_MagneticTrackOptCtrl->SetSelection( g_MagneticTrackOption ); m_MagneticTrackOptCtrl->SetSelection( g_MagneticTrackOption );
if( GetSizer() )
{
GetSizer()->SetSizeHints( this );
}
} }
......
...@@ -28,6 +28,7 @@ DIALOG_PADS_MASK_CLEARANCE::DIALOG_PADS_MASK_CLEARANCE( WinEDA_PcbFrame* parent ...@@ -28,6 +28,7 @@ DIALOG_PADS_MASK_CLEARANCE::DIALOG_PADS_MASK_CLEARANCE( WinEDA_PcbFrame* parent
m_Parent = parent; m_Parent = parent;
MyInit(); MyInit();
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
Centre();
} }
......
...@@ -89,6 +89,8 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( WinEDA_BasePcbFrame* parent, D_PAD ...@@ -89,6 +89,8 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( WinEDA_BasePcbFrame* parent, D_PAD
{ {
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
} }
Center();
} }
......
...@@ -258,6 +258,20 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnAddOrInsertPath( wxCommandEvent& event ) ...@@ -258,6 +258,20 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnAddOrInsertPath( wxCommandEvent& event )
if ( jj >= 0 ) if ( jj >= 0 )
ipos = jj; ipos = jj;
} }
// Ask the user if this is a relative path
int diag = wxMessageBox(
_( "Use a relative path?" ),
_( "Path type" ),
wxYES_NO | wxICON_QUESTION, this );
if( diag == wxYES )
{ // Make it relative
wxFileName fn = path;
fn.MakeRelativeTo( wxT(".") );
path = fn.GetPathWithSep() + fn.GetFullName();
}
m_listUserPaths->Insert(path, ipos); m_listUserPaths->Insert(path, ipos);
m_LibPathChanged = true; m_LibPathChanged = true;
wxGetApp().InsertLibraryPath( path, ipos+1 ); wxGetApp().InsertLibraryPath( path, ipos+1 );
......
...@@ -44,7 +44,6 @@ public: ...@@ -44,7 +44,6 @@ public:
private: private:
void OnCloseWindow( wxCloseEvent& event ); void OnCloseWindow( wxCloseEvent& event );
void OnInitDialog( wxInitDialogEvent& event );
void OnPrintSetup( wxCommandEvent& event ); void OnPrintSetup( wxCommandEvent& event );
void OnPrintPreview( wxCommandEvent& event ); void OnPrintPreview( wxCommandEvent& event );
void OnPrintButtonClick( wxCommandEvent& event ); void OnPrintButtonClick( wxCommandEvent& event );
...@@ -89,10 +88,8 @@ DIALOG_PRINT_FOR_MODEDIT::DIALOG_PRINT_FOR_MODEDIT( WinEDA_DrawFrame* parent ) : ...@@ -89,10 +88,8 @@ DIALOG_PRINT_FOR_MODEDIT::DIALOG_PRINT_FOR_MODEDIT( WinEDA_DrawFrame* parent ) :
m_Config = wxGetApp().m_EDA_Config; m_Config = wxGetApp().m_EDA_Config;
InitValues(); InitValues();
if( GetSizer() ) GetSizer()->SetSizeHints( this );
{ Center();
GetSizer()->SetSizeHints( this );
}
} }
......
...@@ -129,7 +129,8 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -129,7 +129,8 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
/* Fabrications Outputs submenu append */ /* Fabrications Outputs submenu append */
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, fabricationOutputsMenu, ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, fabricationOutputsMenu,
-1, _( "Fabrication Outputs" ), -1, _( "Fabrication Outputs" ),
_( "Generate files for fabrication" ), export_xpm ); _( "Generate files for fabrication" ),
fabrication_xpm );
/* Import submenu */ /* Import submenu */
wxMenu* submenuImport = new wxMenu(); wxMenu* submenuImport = new wxMenu();
...@@ -266,7 +267,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -266,7 +267,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
/* Find */ /* Find */
#if !defined( __WXMAC__) #if !defined( __WXMAC__)
text = AddHotkeyName( _( "&Find..." ), s_Pcbnew_Editor_Hokeys_Descr, HK_FIND_ITEM ); text = AddHotkeyName( _( "&Find" ), s_Pcbnew_Editor_Hokeys_Descr, HK_FIND_ITEM );
#else #else
text = _( "Find\tCtrl+F" ); text = _( "Find\tCtrl+F" );
#endif #endif
...@@ -288,7 +289,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -288,7 +289,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
/* Tracks */ /* Tracks */
item = new wxMenuItem( editMenu, ID_MENU_PCB_CLEAN, item = new wxMenuItem( editMenu, ID_MENU_PCB_CLEAN,
_( "&Tracks" ), _( "&Tracks and Vias Cleanup" ),
_( _(
"Clean stubs, vias, delete break points, or connect dangling tracks to pads and vias" ) ); "Clean stubs, vias, delete break points, or connect dangling tracks to pads and vias" ) );
item->SetBitmap( delete_body_xpm ); item->SetBitmap( delete_body_xpm );
...@@ -438,7 +439,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -438,7 +439,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
item = new wxMenuItem( dimensionsMenu, ID_PCB_MASK_CLEARANCE, item = new wxMenuItem( dimensionsMenu, ID_PCB_MASK_CLEARANCE,
_( "Pads Mask Clearance" ), _( "Pads Mask Clearance" ),
_( "Adjust the global clearance between pads and the solder resist mask" ) ); _( "Adjust the global clearance between pads and the solder resist mask" ) );
item->SetBitmap( pad_xpm ); item->SetBitmap( pads_mask_layers_xpm );
dimensionsMenu->Append( item ); dimensionsMenu->Append( item );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment