Commit Graph

145 Commits

Author SHA1 Message Date
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
Marek Roszko 3d4ac9af03 Relocate win32 resource files to the central folder for further consolidation 2021-03-09 21:48:14 -05:00
Marek Roszko 8831c5567c Add win32 version manifest block 2021-03-04 00:34:48 -05:00
Fabien-B d96577932d Bitmap2Component: Fix footprint attributes. Fix #7496 2021-02-21 13:00:11 +00:00
Jeff Young 66b33834b5 Always enable save; move dirty bit to asterisk in title bar.
Also unifies PCB Editor and Schematic Editor names with other
locations in the GUI (which were still Pcbnew and Eeschema).

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

Fixes https://gitlab.com/kicad/code/kicad/issues/7594
2021-02-18 16:05:42 +00:00
Seth Hillbrand 6598182b28 Cleanup 2021-02-15 10:41:27 -08:00
Wayne Stambaugh 5ecef204cd Coding policy fixes.
Using "this->" violates coding policy section 2.7.
2021-02-09 11:35:43 -05:00
Seth Hillbrand dc424ec7ff Make slider work with keyboard
Fixes https://gitlab.com/kicad/code/kicad/issues/7430
2021-02-05 11:28:37 -08:00
Roberto Fernandez Bautista 9aedeae5c3 Don't log error messages when using the clipboard
wxClipboard::GetData()and wxClipboard::SetData() both log a "wxLogSysError" error-level message (see for example:  https://github.com/wxWidgets/wxWidgets/blob/v3.1.4/src/msw/clipbrd.cpp#L703 ). This logged message gets displayed as a messagebox to the user.

The logging can be disabled temporarily by creating a wxLogNull object. See https://docs.wxwidgets.org/3.0/classwx_log_null.html

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6956
2021-02-03 01:55:05 +00:00
Wayne Stambaugh 6ab1144ea3 Fix broken Doxygen comment specifiers.
Please note, ///> is not a valid Doxygen comment specifier.  ///< is the
correct specifier to use for single line or short Doxygen comments.
2021-01-25 07:42:36 -05:00
Seth Hillbrand 61ac9c8d90 Add multiple size icons for programs
In theory, the WM should now choose the closest size icon for its
purpose, making it easier to distinguish in space-constrained settings

Fixes https://gitlab.com/kicad/code/kicad/issues/6798
2020-12-22 15:37:26 -08:00
Seth Hillbrand 54ca087999 Update icon resource sets
Updates the .icns, .ico and .png files used by various distros to show
KiCad and KiCad files.
2020-12-22 15:16:33 -08:00
Jeff Young a207bd97bb Naming conventions. 2020-11-17 16:05:49 +00:00
Jeff Young dff5173baf Exorcise some instances of "modedit". 2020-11-17 16:05:48 +00:00
Wayne Stambaugh c7926db553 More minor dialog layout improvements. 2020-11-16 07:29:07 -05:00
Jeff Young d094f86b1a Finish module cleanup (except for xpms). 2020-11-14 22:00:12 +00:00
Marek Roszko b043b5b5c6 Nip 3 no longer needed common includes 2020-10-25 20:01:13 -04:00
Marek Roszko eeac3cb4d5 Nix some more common.h includes 2020-10-24 00:38:25 -04:00
Marek Roszko 1d559108c8 Move LOCALE_IO out of common.h 2020-10-23 21:49:42 -04:00
Seth Hillbrand 2a43b88115 Standardize PostScript capitalizaiton 2020-10-20 13:09:13 -07:00
Seth Hillbrand 4085757aeb Remove beginning/ending spaces in translations
Adding space padding makes translations more difficult by increasing
string counts
2020-10-20 12:08:04 -07:00
Mark Roszko a8bd0a9b84 Handle Windows manifests ourselves and add dpi awareness option 2020-10-10 19:08:23 +00:00
jean-pierre charras 65550e6a6e Fix a link issue (symbol not found) on Windows. 2020-06-21 10:32:42 +02:00
Jeff Young ad12c42e8b Push grid settings dialogs down into common.
This also gives support for fast grid switching and a user grid
to eeschema.

Fixes https://gitlab.com/kicad/code/kicad/issues/2200
2020-06-14 19:26:37 +01:00
Jeff Young fc44506fe1 Give up on enforcing non-defined-internal-units.
It results in trade-offs in packaging and/or conidtional compilation
which are worse than the disease.
2020-06-13 22:44:16 +01:00
Wayne Stambaugh b624c7090a Deprecate saving legacy schematic and symbol library file formats.
REMOVED: The ability to save schematics in the legacy file format.
2020-05-29 12:43:00 +00:00
Ian McInerney e4b6487fca Overhaul compiler warnings infrastructure
* Track our warnings separate from normal flags
* Remove all warnings from the SWIG code
* Add more GCC warnings
2020-05-06 01:47:20 +01:00
Jeff Young d69ebfae49 Push tool framework base down into TOOL_HOLDER.
This allows us to use it outside of EDA_BASE_FRAMEs (in this case, in
PANEL_PREVIEW_3D.)
2020-03-24 19:00:25 +00:00
Jeff Young 204f2cd580 Reference -> reference designator.
Fixes https://gitlab.com/kicad/code/kicad/issues/4012
2020-03-17 16:09:25 +00: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
Ian McInerney 06c979dfaa Convert all CMake paths to absolute instead of relative
It is cleaner and safer to handle the include and source paths
as absolute from the source directory instead of relative to every
path.
2020-01-22 23:27:20 +00:00
Jeff Young 45ca0a5ab8 Avoid divide-by-zero. 2020-01-15 18:50:47 +00:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions

This is part of cleaning the build system for #1906.
2020-01-07 17:12:59 +00:00
Ian McInerney 5c0656d97f Move potrace and libcontext into thirdparty directory
Part of the cleanup in #3637
2019-12-28 18:17:55 +00:00
Ian McInerney 25a302758e Fix macos plist version string generation
Generate these resource files similar to how it is done one Linux.

Fixes mac-builder issue https://gitlab.com/kicad/packaging/kicad-mac-builder/issues/275
2019-12-26 12:42:25 +00:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Seth Hillbrand 4d2e953f42 Cleanup: Replace C-only deprecated headers
This replaces headers deprecated by C++14 with their equivalent
replacement
2019-12-05 11:03:15 -08:00
Jeff Young a25368cc6b Improve spelling.
The groundwork here is thanks to kunda1.

Fixes: lp:1831510
* https://bugs.launchpad.net/kicad/+bug/1831510
2019-08-20 19:14:05 +01:00
jean-pierre charras 29e9b9f792 bitmap2component: set polygons outlines thickness to 0.0 in kicad_mod export format.
Previoulsy set to 0.01 mm. Set it to 0 does not really change the look,
but it avoid to draw a lot of not useful segments when drawing polygons.
2019-07-24 15:35:15 +02:00
Seth Hillbrand 77cefe0c16 Normalize line endings
A few files snuck in with CRLF for the line endings.  These make it hard
to look at diffs as every line appears to have changed.  This commit
makes only line ending changes, so can be ignored
2019-06-19 15:18:30 -07:00
Jeff Young bacb8c26cc Fix compiler warnings. 2019-06-19 19:10:46 +01:00
jean-pierre charras 6a9eb4576d Fixes in bitmap2cmp: enhancements and fixes.
* Better messages, more easy to translate
* Error messages are now displayed.
* Move start code to bitmap2cmp_main.cpp.
2019-06-19 18:24:39 +02:00
jean-pierre charras 0e4cd590cf Fixes in bitmap2cmp: enhancements and fixes.
* Cleaning code
* When changing the units, the displayed sizes are converted to the new value.
* Fix incorrect changes when the aspect ration is fixed, in DPI units.
2019-06-19 16:23:00 +02:00
jean-pierre charras b2eac14552 Fixes in bitmap2cmp: remove empty strings (not translatable) and a few cosmetic enhancements. 2019-06-19 08:24:09 +02:00
Johannes Wågen 3ecf3ae4b2 bitmap2component: Added support for multiple input units and locking of aspect ratio. 2019-06-19 08:24:08 +02:00
jean-pierre charras a076f5092c I18n: fix a few useless leading spaces in messages. 2019-06-16 20:29:11 +02:00
Seppe Stas 455ee4c08c Set KiCad version in MacOS apps
Uses CMake's configure_file function [1] to automaticaly set the
CFBundleShortVersionString [2] value in every app's Info.plist file.

Also updates the CFBundleLongVersionString and CFBundleVersion with the
extended KiCad Version

[1]: https://cmake.org/cmake/help/latest/command/configure_file.html
[2]: https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring
2019-06-12 04:40:03 -07:00
Jeff Young 5e49517781 Move hotkeys to ACTION architecture. 2019-06-10 23:46:00 +01:00
Seth Hillbrand 35da498a32 bitmap2component: Fix logic for alpha mask
For POTRACE, black is the foreground and white is the background.  We
should keep the convention by requiring the pixin to be less than the
black threshhold as well as the alpha to be at least the alpha
threshhold.

Fixes: lp:1821563
* https://bugs.launchpad.net/kicad/+bug/1821563

(cherry picked from commit f1704fd61a)
2019-06-08 12:06:18 -07:00
jean-pierre charras 6695209246 Bitmap2component: add button to export to the Clipboard.
It is useful mainly in Pcbnew, to import a logo from Bitmap2component,
without the constraint to create a file and use the fp editor.
Also a bit of cleanup code.

Fixes: lp:1820829
https://bugs.launchpad.net/kicad/+bug/1820829
2019-05-30 20:23:07 +02:00