As of wxWidgets 3.2, the wxWidgets event handler runs code after the
the client event handler that depends on the menu still existing.
Because there are potentially many paths to call ReCreateMenuBar from
within a menu event handler, let's just wrap this action in a CallAfter
to make sure it happens after the wx handler call completes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13149
Our menu bar code is interestingly complex. But we were throwing away newly made menu items to the void in the cases of constructed on the fly submenus
The ACTION_MENU constructor now takes the tool as an argument,
so the call to SetTool() immediately following it can be removed
and the tool just passed into the constructor.
Saying "Import/Export" on the labels when the submenu has "Import"
or "Export" in it is redundant.
Note that we can't just update the action text with the new name,
because that is used in the hotkey list and would become too confusing
without the "Import"/"Export" text.
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.
Some differences are due to difference between libraries being files
in symbol editor and directories in footprint editor, but this unifies
most of the rest.
It also dispenses with the save-to-library vs save-to-document distinction
in the GUI because it makes for too much variability in the GUI, was
implemented differently between the two editors, and isn't needed as much
anymore now that we have the highly visible infobar.
There was also an issue that the save-to-board icon occupies the same
location and has the same size/shape/colours as the Board Setup icon in
PCBNew.
Fixes https://gitlab.com/kicad/code/kicad/issues/7215
- Improve contrast of ratsnest icons by removing blue
- Track icon: make blue as it is a board feature
- Muwave icon: remove handles, make serpentine blue, thicken and pixel align
- New, simplified zone and rule area icons
- Simplify draw tools by removing edit handles/guidelines - improves contrast
- Reorder draw tools in toolbar/menubar to make a little more sense
- Rotate measurement icon (ruler) to match bottom left -> top right
The accelerator strings really shouldn't be part of the translation,
and some translations have cause the accelerator keys to be incorrectly
handled. It is simpler to make it separate and just join them to the
translated string.
Make all accelerator modifiers use lowercased Ctrl instead of CTRL
to be the same as the other modifiers.
Fixes https://gitlab.com/kicad/code/kicad/issues/5992
These objects can now be used in advanced DRC rules and
not just for keeping things out. Also remove the restriction
that at least one of the "basic" keepout rules must be set,
so that these areas can be used for more advanced rules.