Commit Graph

578 Commits

Author SHA1 Message Date
Marek Roszko 5116fa6d12 Fix STEPPED_SLIDER glitchlyness on windows
wxWidgets drives some of this problem, it blindly calls SetValue and invokes the win32 update position messages on all the scroll subevents and we end up fighting it as well by inserting the rounded position on each subevent rather than the final one
2021-07-06 00:58:19 -04:00
Marek Roszko 70ce74ed4a Configure page and line size in STEPPED_SLIDER 2021-07-06 00:40:53 -04:00
Marek Roszko c356cd2aa9 Enable the tick marks to actually show on the STEPPED_SLIDER 2021-07-06 00:06:57 -04:00
Marek Roszko 96a177da3d Add more input controls to IsInputControlEditable
O god this is going to eventual cause performance issues....but this fixes keyboard based form input in some places like pl_editor with its dropdowns
2021-07-05 23:47:16 -04:00
Marek Roszko 1fb42c5e43 Try and cleanup the input focus/key event a little 2021-07-05 20:48:48 -04:00
Marek Roszko 12305990bb Fix focus stealing from wxDataViewCtrl 2021-07-05 13:45:06 -04:00
Marek Roszko f524d9bec2 Add search control to the focus guard 2021-07-05 11:39:05 -04:00
Marek Roszko 2d696c3606 Update SetHint to SetDescriptiveText 2021-07-05 11:32:00 -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
Jeff Young 5e30be66aa Quiet unused variable warning on Mac. 2021-07-03 23:39:34 +01: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
Wayne Stambaugh 3f6811f413 Minor dialog layout improvements. 2021-07-02 11:36:06 -04: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
Jeff Young a1dfc36233 More error message regularization. 2021-06-29 01:08:26 +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
Jeff Young be980df1ca Fix uninitialized variable. 2021-06-12 11:33:18 +01:00
Jeff Young 7fdbe2f387 Fix uninitialized variable found by JP. 2021-06-11 19:38:16 +01: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 5f1e9bc8a7 Fix typos in source code 2021-06-10 01:24:15 +00:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Marek Roszko d946d6e68f Cleanup some pgm_base.h includes 2021-06-08 21:56:00 -04:00
Jon Evans ad6256bdca Fix linux/wx3.0 build 2021-06-07 19:07:49 -04:00
Marek Roszko 0e16db0c25 Kick wx.h mostly out of common 2021-06-07 18:38:52 -04:00
Marek Roszko ca9b719af3 Add missing headers for linux post wx.h removal 2021-06-07 18:22:20 -04:00
Marek Roszko 8f2819cfa4 Kill the last of wx/wx.h in headers 2021-06-07 17:59:20 -04:00
Marek Roszko 10e60acf34 Clean up including of board_design_settings.h 2021-06-06 15:03:42 -04:00
Ian McInerney dc27079b71 cleanup tool event and tool action includes 2021-06-06 18:26:26 +01:00
Marek Roszko b1c9083743 Remove the wx/docview.h include 2021-06-03 18:42:08 -04:00
Ian McInerney 2de010f08b Fix ordering of class constructor init list 2021-06-03 20:04:00 +01:00
Wayne Stambaugh 7c14e4e967 Common widget header housekeeping. 2021-06-03 12:02:45 -04:00
Marek Roszko 7faee5eda5 Stop salt the eart with wxhtml.h 2021-06-03 07:49:49 -04:00
Ian McInerney 3ab69939f9 Remove wx.h from many files 2021-06-03 02:19:20 +01:00
Wayne Stambaugh 19607f1488 Fix file browser text button default path handling. 2021-05-27 14:19:06 -04:00
Jeff Young ccaf9e11df Load footprint info when there's no cache available.
Fixes https://gitlab.com/kicad/code/kicad/issues/8371
2021-05-14 22:24:21 +01:00
jean-pierre charras f6f2284851 Fix missing includes on Linux after commit 0427bda7 2021-05-01 20:05:01 +02: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
Jon Evans 64d35ecebc Enable dark mode for MacOS 2021-04-28 23:24:19 -04:00
Ian McInerney ecd9bf696e Be consistent about using nullptr instead of 0
0 can be too easily overloaded into an int, so ensure we use nullptr
when we mean pointers.
2021-04-22 22:20:34 +01:00
Marek Roszko ce3a84f579 Consolidate wx aui dock art color setting 2021-04-19 21:12:02 -04:00
Ian McInerney 0bdce00c42 Be explicit we don't care about the wxID of the control 2021-04-16 17:49:52 +01:00
Marek Roszko 43e93cc801 Force disable the native dropdown caret on grid comboctrl's we create
Fix #7212
2021-04-14 22:54:40 -04:00
Marek Roszko cb215a0abe Ensure our grid helper comboctrls generate returns as events instead of internally processing
Fix #1874
2021-04-14 21:37:21 -04:00
david-beinder 6b0ff156ae Allow creating uppercase net names in net selector
Also show option to create a new net if the search string is a substring of an already existing net name
2021-04-09 22:38:15 +00:00
Jonathan Haas 55679be2e3 Fix some typos across the codebase 2021-04-05 16:15:25 +02:00
Carsten Schoenert 8dff3725ac Typo fix: Correct 'allow to' -> 'allows one to' 2021-04-03 13:39:50 +00:00
Jeff Young e1a3a8338c File left out of previous commit. 2021-04-01 18:10:04 +01:00
Jeff Young a4fba7014e Give the infobar a reasonable colour on Mac. 2021-04-01 11:55:48 +01: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
Ian McInerney 1d81826409 Use disabled text in message panel when window isn't active
When the window is not active, the status bar uses disabled text,
so the message panel sticks out because it is then using a different
text color. This is most noticable in dark mode.
2021-03-26 15:50:56 +00:00
Jeff Young 262badf6ea Back out arrow support for lib trees. 2021-03-25 15:51:00 +00:00
Jeff Young 7593ee3917 Add right/left arrows for exapand/collapse.
Fixes https://gitlab.com/kicad/code/kicad/issues/8022
2021-03-25 12:23:18 +00:00
Jon Evans c04e19f9ac Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
Jeff Young b4e2db5913 Improve dialog layout. 2021-03-20 00:41:09 +00:00
Jon Evans cc9787e47a Make sure space for message is reserved in APP_PROGRESS_DIALOG
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7953
2021-03-19 19:11:32 -04: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
Jeff Young b71ab01de4 More wxWidgets 3.1 layout adjustments. 2021-03-13 00:00:38 +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
Jon Evans 8dcf5404fc Better UX for handling vertical scroll mapping
Show an error instead of preventing an invalid state
2021-02-24 00:07:17 -05: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
Seth Hillbrand 05b559c9dc Quiet gcc warnings 2021-02-18 11:20:27 -08:00
Jeff Young fd91529d88 Quiet Coverity. 2021-02-18 11:53:36 +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
Wayne Stambaugh 5ecef204cd Coding policy fixes.
Using "this->" violates coding policy section 2.7.
2021-02-09 11:35:43 -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
jean-pierre charras c155218582 Sim plot: fix a rounding issue that can create a missing point in a plot.
Due to a truncation when converting a value to integer, the first point was
sometimes missing because it looked like out of plot range.
Fix also a cosmetic issue in dialog.
Fixes #7345
https://gitlab.com/kicad/code/kicad/issues/7345
2021-01-31 10:36:26 +01:00
Jeff Young f0aa6aa442 Fix drop-down-too-narrow-on-first-drop bug. 2021-01-28 11:35:18 +00: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
jean-pierre charras 1ff2622b3c wxGTK: fix an issue in WIDGET_HOTKEY_LIST ctor.
fixed for wxWidgets 3.0, but still existing in 3.1
2021-01-10 12:53:34 +01: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
Seth Hillbrand 8af4cf88a0 Fix crash when deleting symbol in GTK
So many things can go wrong with this control in GTK.  We have to
collapse the tree when updating the search string to avoid a crash when
referencing a child object but collapsing the tree will iterate over
elements and crash when we have deleted a symbol.

The temporary fix for this nonsense is to carefully order the calls.
We only need to collapse the search tree if we are not keeping our state
(in other words if we are fully re-building the tree)

Fixes https://gitlab.com/kicad/code/kicad/issues/6910
2021-01-04 09:15:40 -08:00
Michael Kavanagh 154e19b6e7 Icons: use common prefix for small 16x16 2021-01-02 23:16:33 +00:00
jean-pierre charras dc28de16d4 Refinement in infobar
- Fix a minor coding style issue.
- Remove double buffering, not needed with the new code, and that creates a
minor cosmetic issue when showing or hiding the infobar.
2020-12-29 11:13:07 +01:00
jean-pierre charras bfea2ab9f4 Fix incorrect calculation of infobar width on Linux and Windows.
The calculation was using the frame width, instead of the the GAL
canvas width.
Fixes #6865
https://gitlab.com/kicad/code/kicad/issues/6865
2020-12-29 10:32:22 +01:00
Jeff Young caefc9dc91 Fix minor spacing issue in Symbol Chooser. 2020-12-23 18:33:17 +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
jean-pierre charras eb7dc6ddd9 Minor fixes. In stand alone show the frame as soon as possible.
Especially when running Pcbnew to open a complex board the frame is shown faster.
Add also a busy cursor when loading files and building the data.
2020-12-21 17:44:10 +01:00
Jeff Young 7bc42f387a Make sure splitter sashes are visible.
Also might fix 6791, although that's probably a long-shot.

Fixes https://gitlab.com/kicad/code/kicad/issues/6791
2020-12-20 12:35:41 +00:00
Wayne Stambaugh aab3c936f0 Move headers from common folders to appropriate include folders round 2. 2020-12-17 11:44:03 -05: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
Marek Roszko e07848d887 Make the footprint preview control bg the same as the preview itself
Fix #5571
2020-12-14 09:48:26 -05:00
Jeff Young d0e008053a Fix compile issue on OSX. 2020-12-13 23:46:20 +00:00
Marek Roszko 8b843d023c Double buffer the info panel
Fix #6721
2020-12-13 13:14:19 -05:00
Jeff Young 65f9212f46 Naming conventions. 2020-12-12 03:43:41 +00:00