Commit Graph

43 Commits

Author SHA1 Message Date
Jeff Young b84d1456d5 KIFACE_I -> KIFACE_BASE. 2021-09-14 23:45:14 +01:00
Jeff Young 3aae3c6f65 Dark mode for a bunch of HTML dialogs.
WX_HTML_REPORT_BOX
WX_HTML_REPORT_PANEL
HTML_MESSAGEBOX
DIALOG_DISPLAY_HTML_TEXT

Fixes https://gitlab.com/kicad/code/kicad/issues/9157

Fixes https://gitlab.com/kicad/code/kicad/issues/9156
2021-09-14 21:23:57 +01:00
Marek Roszko 4712d7a918 Remove a leaky wx/msgdlg.h include 2021-06-06 08:45:38 -04:00
jean-pierre charras 0427bda768 Remove useless wx/wx.h include, that create sometimes compil warnings on msys.
wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
2021-05-01 19:32:15 +02:00
Jeff Young 07aea4339d Formatting. 2021-03-20 21:53:29 +00:00
Jon Evans 18037e2f65 Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.

Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz

The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.

Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.

Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Michael Kavanagh 154e19b6e7 Icons: use common prefix for small 16x16 2021-01-02 23:16:33 +00:00
Jeff Young 62e5500420 Cleanup dialog layout & punctuation. 2020-11-23 19:47:55 +00:00
Marek Roszko 90db12df2e Rename the dxf units option to Default Units
The reality is the DXF file can still override the selected unit option which is totally fine.
In fact, per specification, there is a way to change units mid-file with block records :/
2020-11-22 22:15:58 -05:00
Marek Roszko 88bee5e32f Use the last used dxf units selection on dialog open 2020-11-22 15:44:36 -05:00
Marek Roszko 39fe89096e Allow specifying the DXF file units on import
There is no guarantee DXF contains $INSUNIT to specify the units of the file as its optional.
This allows the user to specify the expected units via dropdown.
SolidWorks can definitely generate such unit lacking files as an example
2020-11-22 15:39:37 -05:00
Jeff Young 2cc9dad4ff More module -> footprint. 2020-11-13 15:16:24 +00:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Jeff Young 4dc877d0e9 Module -> Footprint. 2020-11-08 21:43:19 +00:00
Marek Roszko e49ac45b84 HTML_MESSAGE_BOX is a dialog 2020-10-25 20:01:12 -04:00
Marek Roszko 1d559108c8 Move LOCALE_IO out of common.h 2020-10-23 21:49:42 -04:00
Jeff Young 37906511f5 Class renaming.
DRAWSEGMENT  -> PCB_SHAPE
EDGE_MODULE  -> FP_SHAPE
TEXTE_PCB    -> PCB_TEXT
TEXTE_MODULE -> FP_TEXT
2020-10-05 11:55:33 +01:00
Ian McInerney c479deaf02 Use groups when doing graphics import
ADDED: Allow DXF/SVG graphics to be imported as a group

Also, cleanup the placement routine to allow the edit tool's flip
and rotate routines to be used when placing the items.
2020-08-20 01:22:48 +01:00
Ian McInerney 68f1c678dd Allow DXF/SVG import onto copper layers
ADDED: DXF/SVG import onto copper layers

Fixes https://gitlab.com/kicad/code/kicad/issues/2341
2020-08-20 01:20:53 +01:00
Jon Evans 51eac3e3e6 Split pcbnew and footprint editor settings getters for clarity 2020-05-05 21:46:00 -04:00
Jon Evans e59a3d981e Implement a new settings framework across all of KiCad
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme

Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Seth Hillbrand a2edf9c442 Unified update to C++14 std::make_unique
This update replaces the existing uses of unique pointer creation with
the C++14 std::make_unique call that provides proper memory release in
event of an exception.
2019-12-05 10:43:55 -08:00
Ian McInerney b33c3a5ad8 pcbnew: Clean up extension handling in graphics plugins
* Fix wildcard display in the file selector dialog (on GTK
  it would show the regex to the user)
* Move the file extension comparison into a common function
2019-10-04 15:43:29 -04:00
Wayne Stambaugh 24454f5105 Pcbnew: fix size of graphics import warning dialog.
Use the HTML_MESSAGE_BOX window to present the warning messages rather
than wxMessageBox which would overflow the display when there were a lot
of graphic items that could not be parsed.

Fixes lp:1839565

https://bugs.launchpad.net/kicad/+bug/1839565
2019-09-06 14:57:04 -04:00
Seth Hillbrand 22fdc7f51f pcbnew: Scale line width for import
The line width in the import dialog is meant to reflect the resulting
width and not the given width of the file.

Fixes: lp:1831496
* https://bugs.launchpad.net/kicad/+bug/1831496
2019-08-21 10:25:40 -07:00
Jeff Young 27aacb26f8 Cleanup. 2019-07-16 02:31:07 +01:00
Seth Hillbrand d1877d7c1b Moving modules from DLIST to std::deque 2019-06-01 09:53:23 -07:00
Jeff Young 7553cc2651 Clean up some dangling legacy odds and ends. 2019-06-01 01:17:46 +01:00
Jeff Young e9e28b9aac Retire legacy block architecture. 2019-05-27 11:58:56 +01:00
Wayne Stambaugh 75366bce74 Remove debugging code added in commit d2cb0ca7. 2019-04-03 12:19:50 -04:00
Wayne Stambaugh d2cb0ca75f Pcbnew: fix import graphics dialog issues.
Improve padding, spacing and alignment of dialog layout.

Fix title capitalization.

Make file dialog wildcard string translatable.

Remove fixed initial dialog size to allow sizers to work their magic.

Replace OK button event handler with TransferDataFromWindow.

Remember last line width units between dialog instances and sessions.

Save configuration file settings in a separate group and remove GfxImport
prefix from the entry names.

Add fencing to dialog header file to prevent nested includes.

Fixes lp:1822568

https://bugs.launchpad.net/kicad/+bug/1822568
2019-04-03 09:57:31 -04:00
jean-pierre charras 80cf4ec5cb Add comments about SVG import. 2019-03-11 19:25:52 +01:00
jean-pierre charras 61567d3917 Pcbnew: Enable SVG import in DIALOG_IMPORT_GFX. 2019-03-11 18:30:59 +01:00
jean-pierre charras c56d6ad2dd Fix issues in DXF import and GFX import dialog
Fixes: lp:1812840
https://bugs.launchpad.net/kicad/+bug/1812840
2019-01-22 18:01:04 +01:00
Seth Hillbrand 5433423377 pcbnew: Don't update coords on add
When adding an element to a module, we don't need to update the relative
coordinates.  Doing so can cause changes when writing to file depending
on rotation and position.

Fixes: lp:1810870
* https://bugs.launchpad.net/kicad/+bug/1810870
2019-01-15 12:14:02 -08:00
John Beard 892f7cf8ff Make SVG import an advanced config, not a compile option.
This demos the advanced config and allows no-recompile switching
of the SVG importer. It also allows the import manager to be
tested more completely.
2018-12-28 11:36:09 -05:00
jean-pierre charras 1d230bbee9 very minor fixes to help I18n translations (remove trailing spaces) 2018-12-20 20:19:45 +01:00
John Beard bb18c9201b Make SVG import a CMake option (experimental)
This allows too turn it on for work without an additional patch.

Also fix a bug in the disable code - when the SVG is enabled,
allow to select SVG files.
2018-12-04 18:53:28 +01:00
jean-pierre charras a762c4d86e Import GFX: temporary disable SVG import until V6.0.
SVG import need some refinements to be efficient, so it is disable for v 5.x.
Will be re-enabled later.
Enabling SVG import is *only* for developers, not for users.
2018-12-03 15:31:40 +01:00
jean-pierre charras cc0aa8b928 Gfx import: fix many issues, and add many enhancements.
* Do not compile dxf old files.
* import gfx, gal mode: make absolute placement working.
* Import gfx in legacy canvas: use it and make interactive placement working
* Take imported line width in account. Ensure DXF line thickness is OK.
* handling empty files in legacy mode.
2018-12-03 15:25:44 +01:00
jean-pierre charras 430c61822d Import svg import code from experimental trunk: convert dxf importer 2018-12-03 13:42:23 +01:00
jean-pierre charras 74a9d5401a Import svg import code from experimental trunk: start point 2018-12-03 13:42:22 +01:00