Commit Graph

39 Commits

Author SHA1 Message Date
Jeff Young 5974899fa5 Clean up file locations and names. 2018-09-22 16:23:13 +01:00
Jeff Young 33fc74a04d Performance enhancements for Footprint Editor construction. 2018-08-04 10:29:17 +01:00
Jeff Young 106dd60e45 Only adjust LAYER_WIDGET font size if larger than indicator.
Also moves adjustment into LAYER_WIDGET so all the callers don't
have to deal with it individually.

Fixes: lp:1767965
* https://bugs.launchpad.net/kicad/+bug/1767965
2018-05-02 21:49:57 +01:00
Maciej Suminski ce610f33a2 Coverity fixes
resource leak: #172233
negative array index write: #102363
uninitialized scalar field: #174540 #174539
structurally dead code: #169334 #169331
2018-03-19 10:02:05 +01:00
Jeff Young 3b0a758f97 Ensure router layer is visible.
Fixes: lp:1663556
* https://bugs.launchpad.net/kicad/+bug/1663556
2018-03-16 02:43:17 +00:00
jean-pierre charras 1597f31d4b Fix a crash due to uninitialized variable. 2018-02-23 11:50:38 +01:00
Jon Evans b67b4b9ea9 Rearrange Render panel of PcbNew layer widget; add spacers 2018-02-22 18:09:26 -05:00
Jeff Young 4dda8a39fe Add inc/dec current layer alpha to menus.
Also adds indicators in layers palette for feedback.
Also generates sized images for all indicators instead of using
scaled bitmaps (which didn't look great).
Also fixes a completely unrelated typo in a UI string.
2018-02-22 17:48:14 +01:00
Jeff Young 38227161bf Fix drawing of transparent layer swatches.
Also fixes a related bug to redraw holes when changing the
pcb background colour.

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

Fixes: lp:1741101
* https://bugs.launchpad.net/kicad/+bug/1741101
2018-01-06 12:12:39 -05:00
Seppe Stas d7b143f6f0 Right click option to change layer and render color 2017-09-22 17:41:42 +02:00
Tomasz Włostowski 32185ddcd3 Multiple improvements concerning colors, configuration handling and legacy features in pcbnew:
- support for background color setting
    - removed several global config settings (such as g_Drc_On)
    - wrapped most of global config settings in PCB_GENERAL_SETTINGS class
    - reorganized PCB general options dialog to clearly mark which options concern only the legacy canvas
    - new GAL feature for legacy users: double-click (or E) to change track width available as an option.

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

Fixes: lp:1707145
* https://bugs.launchpad.net/kicad/+bug/1707145
2017-08-04 16:06:57 +02:00
John Beard 1d039cb4c1 Break row indicators out to own class
The introduces INDICATOR_ICON, which is a very simple class holding a
bitmap that can toggle on or off.

The ICON_PROVIDER class then provides icons to INDICATOR_ICONS, which
means the class can be used for more than just row indicators.

A default row icon provider is also provided for use in the standard row
selector.
2017-03-01 09:44:41 +01:00
John Beard b8d0b0d7be Move layer/render swatches to own class
This introduces COLOR_SWATCH, which is a reusable
widget that shows a color swatch and can invoke the colour picker
when duble/middle clicked.

It uses it's own wxCommandEvent to signal the change.

This makes the layer widget simpler internally, and also allows other
code to show identical swatches if needed.
2017-03-01 09:44:41 +01:00
John Beard e609bc3f0d Use wxStaticBitmaps for layer/render swatches
On Linux with recent GTK+ toolkits, these swatches had very wide
borders, resulting in colour swatches of only a few pixels. On OSX, all
borders were disabled, leaving only the swatch.

This commit changes the wxBitmapButton to wxStaticBitmap, which fixes
the issue on Linux GTK+ and also removes the platform-specific element,
as it will now be the same on all systems.

These widgets aren't used as buttons anyway, a single click is handled
across the whole row, not just the swatch. So using a button was not the
most intuitive affordance.

Fixes: lp:1605411
* https://bugs.launchpad.net/kicad/+bug/1605411
2017-03-01 09:44:41 +01:00
Maciej Suminski 0dc88bb4cf Changed COLOR4D defines to static consts 2017-02-22 17:35:00 +01:00
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas.  When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
2017-02-22 17:35:00 +01:00
jean-pierre charras 7d8df0425f Modedit: now shows a specific layers manager, which allows user to select the technical layer which is used when adding a new graphic text or outline to the current footprint.
Please, note the layer manager was already available in GAL mode, but is was the same as tne board editor, which is not good.
Now:
- In default mode or GAL mode, the look is the same.
- Only suitable technical layers (i.e. paired layers) are selectable from the layers manager (for special purposes, some other layers can be used, via the graphic items properties dialog)
2015-01-07 20:07:15 +01:00
jean-pierre charras 680ca22279 Fix crash in Pcbnew and Gerbview when seceting (in layers manager) "always hide all layers but activer" 2014-07-20 19:41:12 +02:00
Maciej Suminski 72c70148e8 Fixed a few memory leaks and Valgrind warnings. 2014-07-09 15:02:56 +02:00
Maciej Suminski dca4667e66 PCB_LAYER_WIDGET became able to cooperate with PCB_BASE_FRAME. 2014-07-09 11:59:23 +02:00
jean-pierre charras 5a4c16dcfb Pcbnew, Gerbview : fix crash when updating the layer manager. 2014-07-04 15:53:41 +02:00
Dick Hollenbeck 4578ea8b9e 1) Add 32 Cu Layers.
2) Change from legacy Cu stack to counting down from top=(F_Cu or 0).
   The old Cu stack required knowing the count of Cu layers to make
   sense of the layer number when converting to many exported file types.
   The new Cu stack is more commonly used, although ours still gives
   B_Cu a fixed number.
3) Introduce class LSET and enum LAYER_ID.
4) Change *.kicad_pcb file format version to 4 from 3.
5) Change fixed names Inner1_Cu-Inner14_Cu to In1_Cu-In30_Cu and their
   meanings are typically flipped.
6) Moved the #define LAYER_N_* stuff into legacy_plugin.cpp where they
   can die a quiet death, and switch to enum LAYER_ID symbols throughout.
7) Removed the LEGACY_PLUGIN::Save() and FootprintSave() functions.
   You will need to convert to the format immediately, *.kicad_pcb and
   *.kicad_mod (=pretty) since legacy format was never going to know
   about 32 Cu layers and additional technical layers and the reversed Cu
   stack.
2014-06-24 11:17:18 -05:00
Lorenzo Marcantonio 9ebb4afacc Removed arbitrary MAX_LAYER_ROWS limit (only used in one assertion, anyway) 2013-04-06 18:46:03 +02:00
Lorenzo Marcantonio 9fd79dfa91 Implemented the LAYER_NUM typedef (LAYER was already taken as a class name...) to represent a layer number. 2013-03-31 15:27:46 +02:00
Lorenzo Marcantonio e0303a4558 - New typedef LAYER_MSK to encapsulate a layer bitmap
- Renamed ReturnMaskLayer to GetLayerMask (since it's a plain getter)
2013-03-30 18:24:04 +01:00
Lorenzo Marcantonio e771112259 Enforced EDA_COLOR_T type and minor const-ification 2012-09-02 14:06:47 +02:00
Dick Hollenbeck 2e29b4f152 * Add PCB_EDIT_FRAME::syncLayerVisibilities(), PCB_LAYER_MANAGER::SyncLayerVisibilities().
* Save all visibilities, layer and render, in BOARD and restore on load.
2012-03-11 19:40:48 -05:00
Dick Hollenbeck 6c04e60587 see CHANGELOG.txt 2012-02-05 23:44:19 -06:00
Wayne Stambaugh 4b853dedb4 Application name capitalization fixes.
* Correct all user strings and comments for the correct capitalization of
  application names according to JP.  They are KiCad, Pcbnew, CvPcb,
  Eeschema, and GerbView.
* Add a note the the user interface policy about the correct capitalization.
2011-09-30 14:15:37 -04:00
jean-pierre charras 3b55948db2 fix an issue created by commit 2954. Gerbview: display now an indicator of layers in use. minor code cleanup. 2011-04-05 19:49:14 +02:00
jean-pierre charras a9010796e0 Doxygen comment warning fixes. 2010-12-29 18:47:32 +01:00
dickelbeck 3813e290ac font size tweak, make sure layer_widget_test still compiles 2010-02-10 06:56:37 +00:00
dickelbeck c7bbbeed63 enhance getLayerComp()'s params 2010-01-30 17:42:22 +00:00
dickelbeck 07c35ed356 add more public API functions to LAYER_WIDGET 2010-01-30 17:12:43 +00:00
dickelbeck 6518139b26 more layer widget work 2010-01-24 02:05:07 +00:00
dickelbeck 7399fdc398 improved focus handling, still need to handle the tab change 2010-01-22 19:59:27 +00:00
dickelbeck 920186ddb4 more layer widget incorporation 2010-01-21 20:53:01 +00:00
dickelbeck 58fc9d8f09 layer widget incorporation into pcbnew 2010-01-21 07:41:30 +00:00
dickelbeck 671939fa60 split layer_widget.cpp into *.h 2010-01-18 15:55:18 +00:00