Commit Graph

129 Commits

Author SHA1 Message Date
Ian McInerney 265c6fa3b7 Improve color theme support in the footprint preview widget
This ensures the colors used by the status text pane in the preview
widget are the same as the canvas, so there is a seemless transition
between the two.

Additionally, remove the scrollbars from the symbol preview widget
in the place symbol dialog - they are pointless.
2020-08-10 02:29:15 +01:00
Ian McInerney 63f777b620 Fixup the UI for the symbol preview widget
This is the proper fix for the symbole preview widget. It will ensure
there are no size changes between the two panels (preview and status),
and also ensure that the status panel has the same background color as
the preview panel.

Fixes https://gitlab.com/kicad/code/kicad/issues/4997
2020-08-10 00:55:36 +01:00
jean-pierre charras 98b1f55e29 Eeschema: minor fixes: fix incorrect label in DIALOG_LIB_EDIT_PIN, electrical pin list.
Gives also to functions GetText() and GetBitmap() a more significant name.

Fixes #5007
https://gitlab.com/kicad/code/kicad/issues/5007
2020-07-29 17:04:52 +02:00
Jon Evans 5a9e69b146 Use the eeschema color theme for the symbol preview canvas
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4484
2020-05-18 17:53:46 -04:00
Wayne Stambaugh e91f1f57dd Eeschema: fix rescue multiple unit symbol bug.
The code that checked for pin conflicts to determine if a symbol needed
rescued did not check either the pin convert setting so it was possible
for a pin from the other convert on symbols that do not have identical
units to appear to not have a pin conflict.  Add tests for pin unit and
convert setting to prevent that from breaking the comparison.  This must
have always been broken.

Fix the symbol preview widget to prevent drawing all symbols on top of
each other (if we need to do this the code will have to be revised) and
also show the convert if valid.

Fix broken symbol cache library when saving alias symbols.

Fixes https://gitlab.com/kicad/code/kicad/issues/3879
2020-04-01 20:19:53 -04:00
Jeff Young 7f8f17bd82 Remove empty file. 2020-03-30 14:15:59 +01:00
Jeff Young b054e59a41 Get rid of cursors in preview panels. 2020-03-10 18:54:17 +00:00
Jeff Young fe3e0307d8 Move sheet name and filename to SCH_FIELD architecture.
Only internal storage architecture has changed (so far).
2020-03-06 16:23:44 +00:00
Jon Evans 8660b4c144 ADDED: New color theme editor and multi-theme support 2020-03-06 00:01:03 -05:00
Jeff Young 85c2e0d23a Add user-defined severities, exclusions and colors to DRC markers.
Exclusions are currently persisted in the project file.

Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-04 00:39:28 +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
Jeff Young 2017389f2d Pinning for library trees in FPEditor and SymbolEditor.
Fixes https://gitlab.com/kicad/code/kicad/issues/2288
2020-02-14 00:10:40 +00:00
Mark Roszko 70908043a3 Convert enums inside eeschema and the symbol editor to be scoped
Scope: NETLIST_ITEM, CONNECTION_TYPE, ELECTRICAL_PINTYPE,
       NET_CONNECTION, NETLIST_ITEM, GRAPHIC_PINSHAPE

Note, the pin type enum had PT_ added to the front to prevent
shadowing of the INPUT symbol on msys2 (see discussion at
c17c9960d8)
2020-01-18 20:51:28 +00:00
Wayne Stambaugh 54f066fed7 Implement simple inheritance for library symbols.
This change completely removes the LIB_ALIAS design pattern an replaces
it by allowing LIB_PART objects to inherit from other LIB_PART objects.
The initial implementation only allows for single inheritance and only
supports the mandatory fields in the derived part because that is all
that the current symbol library file format will support.  Once the new
file format is implemented and saving to the old file format is deprecated,
more complex inheritance will be added.  The LIB_ALIAS information saved
in the document files was move into the LIB_PART object.  This change
impacts virtually every part of the schematic and symbol library editor
code so this commit message is woefully incomplete.

REMOVE: Removed the symbol aliases concept from the schematic and symbol
editors and the symbol viewer.

NEW: Replace the symbol alias concept with simple inheritance that allows
a library symbol to be derived from another library symbol.
2019-12-06 11:33:52 -05:00
Jeff Young 102b530162 Fix library tree updating bug present at least on OSX. 2019-11-29 17:55:01 +00:00
Seth Hillbrand 548dbb7c29 eeschema: Add highlight color to configurable list
The highlight color chosen from the system highlight doesn't always show
against the schematic sheet background color.  Allowing the user to
customize with their KiCad theme makes it configurable on par with other
colors.  This is stop-gap until we get full color schemes from
lp:1678345
2019-08-27 10:43:59 -07:00
Jeff Young 6025256e07 Push KIWAY_HOLDER down a level so we can move a bunch of stuff that doesn't belong there out. 2019-06-10 23:46:00 +01:00
Jeff Young 469fc3b572 Finish moving symbol editor tree context menu to ACTIONs. 2019-06-05 23:29:59 +01:00
Jeff Young 2d40425e4d Move footprint & symbol tree context menus to tool infrastructure.
Fixes: lp:1831692
* https://bugs.launchpad.net/kicad/+bug/1831692
2019-06-05 20:16:48 +01:00
Jeff Young da4fe27447 More ACTIONS work. 2019-06-02 21:10:56 +01:00
Jeff Young 33773bad4d Yet more command conversions to ACTIONs. 2019-06-02 21:10:56 +01:00
John Beard 33fe9a2761 Eeschema: Symbol preview widget needs common config for Hi-DPI
Currently, this widget doesn't read the common library settings.
This means it doesn't use the configured DPI scaling or anti-aliasing
settings.

Use the ReadConfig method on the GAL options to fix (rather than
only ReadAppConfig).

Fixes: lp:1825913
* https://bugs.launchpad.net/kicad/+bug/1825913
2019-04-27 14:57:09 +01:00
John Beard ab2281d26f GAL opts: move config reading into GAL_DISPLAY_OPTIONS
Move repeated GAL config reading routines into GAL_DISPLAY_OPTIONS.
THe app-level config is in here already, do the same for the
common config.

This means that the configs are loaded consistently, which fixes
the symbol-chooser preview window, which previously didn't use the
same config routine as other GAL canvases.

Future work could move these functions to free functions that
act on the public interface of GAL_DISPLAY_OPTIONS to avoid
GAL_DISPLAY_OPTIONS having to know about wxConfig and wxWindow.

Fixes: lp:1824524
* https://bugs.launchpad.net/kicad/+bug/1824524
2019-04-12 16:08:11 +01:00
jean-pierre charras 4cd41e3941 Eeschema: avoid using a incorrect background color the first time a SCH_DRAW_PANEL is displayed
When starting Eeschema, or a frame/dialog using a SCH_DRAW_PANEL, the bg color was initialized too late,
thus creating a flicker or an annoying draw artifact (in SYMBOL_PREVIEW_WIDGET for instance) if a Paint event
is fired before the right bg color is initialized.
Initializing the bg color earlier fix this issue.

Fixes: lp:1797203
https://bugs.launchpad.net/kicad/+bug/1797203
2019-01-25 20:32:46 +01:00
Maciej Suminski 24f9bfa13b Fixed memory leaks
This is commit a9efbf47 with a fix for SWIG to deal with unique_ptr.
2018-12-20 10:05:58 +01:00
Seth Hillbrand e307d9318b Revert "Fixed memory leaks"
This reverts commit a9efbf4716.

The commit broke compiles with scripting
2018-12-11 10:12:44 -08:00
Maciej Suminski a9efbf4716 Fixed memory leaks 2018-12-11 16:21:43 +01:00
Jeff Young d2756bedf1 Keep state except when the filter changed.
(Used to be "except when filtering".)

Fixes: lp:1804293
* https://bugs.launchpad.net/kicad/+bug/1804293
2018-11-25 01:51:45 +00:00
jean-pierre charras 0a71212929 Fix a few minor issues in SYMBOL_PREVIEW_WIDGET.
Fixes: lp:1802808
https://bugs.launchpad.net/kicad/+bug/1802808
2018-11-12 20:40:41 +01:00
Jeff Young 69952a7b9f Improve updating of symbol and footprint trees.
In particular, update highlighting when changing footprints.
2018-11-02 19:55:30 +00:00
jean-pierre charras 7985234556 Eeschema: Fix a subtle bug in SYMBOL_PREVIEW_WIDGET.
The dialog was using a LIB_ALIAS from library cache to show the symbol to the canvas without making a local copy.
Unfortunately, the library viewer is doing the same thing.

Now the GAL is used in Eeschema, a link to the VIEW used by the GAL canvas is stored in this class.
When The selector symbol dialog is used to choose a symbol to display in the Library viewer,
a race condition between the Library viewer GAL canvas and the dtor dialog that destroyed this link in the same instancied class.

Now, the SYMBOL_PREVIEW_WIDGET used in the dialog works on a local copy of the symbol to display.
2018-10-31 15:52:35 +01:00
Jeff Young 924c0fa9ed Fetch symbol chooser grid settings from the right place. 2018-10-17 11:14:01 +01:00
Jeff Young 06e63c3073 Add control over worksheet colour in eeschema. 2018-10-09 11:08:56 +01:00
Jeff Young 9dfcc839a4 Fix color issues with cursor and sheet pins. 2018-10-09 11:08:56 +01:00
jean-pierre charras 4a92a5e628 Fix a Eeschema crash when using a SYMBOL_PREVIEW_WIDGET. Fix also a few draw artifacts. 2018-10-09 11:08:56 +01:00
jean-pierre charras a6d014d959 Fix some artifacts when drawing items, both on Cairo and Opengl.
Fix also incorrect selection of De Morgan style selection in SYMBOL_PREVIEW_WIDGET.
2018-10-09 11:08:56 +01:00
Jeff Young 929786ce50 Fixes to grid color and some more CLangTidy fixes. 2018-10-09 11:08:56 +01:00
jean-pierre charras 88cdce8d62 Make SYMBOL_PREVIEW_WIDGET working, and using the canvas type of the caller. Fix an issue with F3 zoom key in libedit. 2018-10-09 11:08:56 +01:00
Jeff Young e45e3b3640 Fix bug with Preferences turning hidden items to black. 2018-10-09 11:08:55 +01:00
Jeff Young afeebc8944 Grid settings for Eeschema GAL.
Split antialiasing options out from display options.  Move
antialiasing to common.  Duplicate the rest of display options
for Eeschema.

Implement OnSelectGrid and hookup GAL canvas refresh to
SetPresetGrid.

Add Grid Settings... to View menu and move Show Grid from
preferences to View Menu to match Pcbnew.
2018-10-09 11:08:55 +01:00
Jeff Young 1c52824913 Rewrite unit/convert handling so it also works for LibEdit. 2018-10-09 11:08:55 +01:00
Jeff Young 6eafb9a2fd Convert Rescue Symbols dialog previews to GAL. 2018-10-09 11:08:55 +01:00
Jeff Young 538a5d49ee Fix up GAL version of Symbol Viewer.
Also includes some preliminary work for supporting hidden pins,
pin electrical names, and other preferences.
2018-10-09 11:08:55 +01:00
Jeff Young da4fb4ae3a Move galDisplayOptions access from pcbnew to common. 2018-10-09 11:08:55 +01:00
Jeff Young a03dc577f8 Add support for units. 2018-10-09 11:08:55 +01:00
Jeff Young 7cbfa08ddd Move symbol chooser dialog preview to GAL. 2018-10-09 11:08:55 +01:00
Tomasz Wlostowski d8b9899516 eeschema-gal: configurable worksheet & grid colors 2018-10-09 11:08:55 +01:00
Tomasz Wlostowski 90c7c60471 eeschema-gal: initial GALified version. Lots of stuff still to do! 2018-10-09 11:08:52 +01:00
Jeff Young c9ca1013b2 Make ModEdit and LibEdit library tree actions more consistent.
Adds Cut/Copy/Paste and Revert for footprints; introduces a new
shared Revert Changes? dialog; hooks up Add Library for footprints,
standardizes the Save As terminology.
2018-10-03 22:46:41 +01:00
Jeff Young 5974899fa5 Clean up file locations and names. 2018-09-22 16:23:13 +01:00