Commit Graph

268 Commits

Author SHA1 Message Date
Marek Roszko 1fb42c5e43 Try and cleanup the input focus/key event a little 2021-07-05 20:48:48 -04:00
Marek Roszko d2aeddc6cb Add debouncing to the choose symbol dialog.
More potato pc friendly in theory.
2021-07-04 21:59:51 -04:00
Marek Roszko 3b33f94c56 Use a wxSearchCtrl instead of wxTextCtrl for the symbol chooser window
This just makes it prettier with the search icon and cancel
2021-07-04 21:24:03 -04:00
Jon Evans e95323a37e Revert "Remove unused variable."
It's only unused on Mac

This reverts commit d3fb22014f.
2021-07-03 16:48:46 -04:00
Jeff Young d3fb22014f Remove unused variable. 2021-07-03 21:16:15 +01:00
Jeff Young 0c2ac9a711 Move GUI font code to common.
This also allows the Mac fixes for font facenames to be more
compartmentalized.

Fixes https://gitlab.com/kicad/code/kicad/issues/8657
2021-06-29 18:27:58 +01:00
david-beinder da833ad7dd Separate focus from hover state in BITMAP_BUTTON, trigger after mouse down+up
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8556
Adds AcceptDragInAsClick() to maintain support for use in toolbar palettes
2021-06-13 17:00:41 +00:00
Marek Roszko 803e2101de Fix MSVC compile error
Templates and linkage, ugh
2021-06-11 07:32:41 -04:00
Jeff Young 44086ff2b2 Pull 3D preferences into KiCad preferences architecture.
Fixes https://gitlab.com/kicad/code/kicad/issues/5187
2021-06-11 11:19:40 +01:00
Wayne Stambaugh fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Wayne Stambaugh 9ebabb222c Pass objects by reference instead of on the stack. 2021-06-08 10:09:38 -04:00
Marek Roszko 8f2819cfa4 Kill the last of wx/wx.h in headers 2021-06-07 17:59:20 -04:00
Marek Roszko 38e3b7eacd We don't need eda_item in unit_binder.h 2021-06-06 11:09:07 -04:00
Wayne Stambaugh 7c14e4e967 Common widget header housekeeping. 2021-06-03 12:02:45 -04:00
Ian McInerney 3ab69939f9 Remove wx.h from many files 2021-06-03 02:19:20 +01:00
Marek Roszko 382dca4e6f Fix uninitialized member warnings
Based on PVS Studio report
2021-05-30 20:01:01 -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
Marcus A. Romer 1632707d9b Replace tabs with spaces 2021-04-05 01:13:39 +00:00
Ian McInerney 3146d03aaa Properly ellipsize layer names in the GerbView layer manager
Before, the layers were always ellipsized if the name was >30
characters, even if the widget was wide enough to display
the full name. Now they are ellipsized when needed (e.g. if
the widget is shrunk small enough).

Fixes https://gitlab.com/kicad/code/kicad/issues/1919
2021-03-26 15:50:56 +00:00
Ian McInerney 804c09b8f2 Use wx to draw the arrow on the collapsable pane
This allows for color changes and scaling of the arrow
when the display needs it (e.g. HiDPI displays).

Also make the arrow and text respond to if the window is
active to mimic native controls.

Fixes https://gitlab.com/kicad/code/kicad/issues/6042
2021-03-26 15:50:56 +00:00
Jon Evans 045160d486 Work around wxProgressDialog layout bug
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4288
2021-03-16 20:44:24 -04:00
Jeff Young 46d71f0d23 Go back to validate-on-OK, but stop doing design checks.
If we keep doing design validations at two different places, they can
only start to drift apart.  Board Setup should validate for malformed
data ONLY; everything else is the business of DRC.

This also fixes a bug where implementation validations would not allow
OK in the dialog, but wouldn't put up a message to say why.  We now use
the InfoBar impl from Jon's commit for that.
2021-03-16 14:49:03 +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
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
Jon Evans 924accfdc8 Consolidate wxAui art providers 2021-03-01 23:10:03 -05:00
Jon Evans 93578517e4 Support dark mode in AuiBar buttons for wx 3.0 2021-03-01 21:24:29 -05:00
Seth Hillbrand 0dca0e752b Reduce the number of built-up calls to DisplayFootprint
When updating the libtree, we modify the tree multiple times to avoid
crashes on Linux.  These generated events that buffered while the widget
was frozen and resulted in redrawing the same footprint 4-10x.

This reduces the buffering by discarding events that are generated
during the freeze and only redrawing when there is a new footprint to
draw
2021-02-25 12:13:42 -08:00
Jeff Young 41b8ef85e3 Fix preferences on OSX. 2021-02-22 11:05:47 +00:00
Jeff Young 2d28ed8eda Move canvas backend selection to Preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/7630
2021-02-21 20:12:43 +00:00
Jeff Young b6a7981e62 Write changes back to grid after using file explorer.
Fixes https://gitlab.com/kicad/code/kicad/issues/7361
2021-02-17 14:08:53 +00:00
Seth Hillbrand dbbe9cdee4 Hide infobar for save when saving 2021-02-16 15:54:43 -08:00
Jon Evans e06aa32780 Launcher tweaks 2021-02-13 08:59:33 -05:00
Jon Evans ab34d94f36 Add a less-intrusive validation system to board setup
For some kinds of issues, we want a way to point them out but
we don't need to keep the user from being able to close the
dialog.  A separate Validate button lets the user check for
issues if desired, but these issues are not "fatal" and can
be ignored if the user wishes.
2021-02-11 22:19:46 -05:00
Jeff Young 1394c1f4d4 Retire disabled buttons in favour of info boxes.
Fixes https://gitlab.com/kicad/code/kicad/issues/7229
2021-02-01 22:56:55 +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
Jeff Young eb80ac464a Remove ability to select "Other" footprint from Symbol Chooser.
We no longer run as a QuasiModal (due to 5206), so we can't put up
the Footprint Browser.

Fixes https://gitlab.com/kicad/code/kicad/issues/7174
2021-01-19 01:18:41 +00:00
Jon Evans d2d4ffe6d0 Dismiss infobar if it's dismissable on board save
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7071
2021-01-12 23:24:13 -05:00
Jeff Young 648c42f643 Show collisions preventing routing from starting.
Also introduces a callback to the infobar so that the view can be
cleaned up when the timer expires.

Fixes https://gitlab.com/kicad/code/kicad/issues/6930
2021-01-04 19:19:55 +00:00
Jeff Young 1ddd0e53bb Remove dead code. 2021-01-04 19:19:55 +00:00
Jeff Young 47ea51ec34 Allow both aui-manager-based infobars and window overlay infobars. 2020-12-22 21:36:39 +00:00
Jeff Young 93dc7feea3 Remove multi-threading for footprint loading.
Also don't load the footprints up front.  The whole purpose of the
footprint-info stuff is to have enough info about the footprints to
filter them *without* loading.  After that just load individual
footprints as we need them.

Fixes https://gitlab.com/kicad/code/kicad/issues/6177
2020-12-21 22:03:24 +00:00
Wayne Stambaugh 08cf9a1e20 Move headers from common folders to appropriate include folders round 1. 2020-12-17 08:12:18 -05:00
Jon Evans a7ea63e610 Hack around broken column sizing in wxGTK 3.0 for hotkey editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6767
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6396
2020-12-16 20:51:18 -05:00
Jeff Young 65f9212f46 Naming conventions. 2020-12-12 03:43:41 +00:00
Jeff Young 42d96fcadc Naming conventions. 2020-12-12 03:43:41 +00:00
jean-pierre charras f26a1a32e0 UNIT_BINDER: better support of DEGREES units (and some fixes).
Especially, add a way to define the number of digits in mantissa.
base_units.cpp: set number of digits in mantissa to 3 instead of 1 for DEGREES
2020-12-11 16:26:58 +01:00
Jeff Young 73b7b104cd Fix some issues with Infobar sizing.
This also commits to the new strategy as it wasn't really compatible
with if-def-ing anymore.
2020-12-11 12:39:40 +00:00
Jeff Young fc2bdc49de Once more into the depths of hell... er, I mean fix a focus issue.
So the new steals-focus protection stuff works well when there's a
focused control, but not as well when there's a modal dialog up which
happens not to have a focused control (or worse, a focusable control).

This adds a second mechanism for also checking to see if a modal dialog
is up (something that wxWidgets, true to form, makes very difficult).

Fixes https://gitlab.com/kicad/code/kicad/issues/6520
2020-11-26 16:47:40 +00:00
Jeff Young c1d1c12b41 Simplify message panel code.
We've had the colours turned off for two releases now without any
screaming or gnashing of teeth, so it's time to clean up the code.
2020-11-18 17:32:40 +00:00