Commit Graph

72 Commits

Author SHA1 Message Date
Ian McInerney 8a11e89d0f Fix the type-based pcb_calculator GetCalculator implementation
ix the problem with the original template-based implementation to limit
the amount of things that could be forgotten by new panel creators
(since we can't just have a static fail method warning about things
beinf forgotten).

This reverts commit a92516bcd2.
2021-10-12 13:37:11 +01:00
jean-pierre charras a92516bcd2 Pcb_calculator: fix not working GetCalculator() template.
Use now wxWidgets functions to find a calculator panel.
Fixes #9358
https://gitlab.com/kicad/code/kicad/issues/9358
2021-10-10 14:16:11 +02:00
Ian McInerney 288a94f5aa pcb_calculator: Remove form builder main window
The form builder window only contained the notebook control, so it was
basically pointless. This removes the base frame and instead makes
PCB_CALCULATOR_FRAME inherit directly from KIWAY_PLAYER.
2021-10-08 18:28:10 +01:00
Ian McInerney 0a1a181798 pcb_calculator: Move calculator panels to a registration architecture
This simplifies operations that touch every panel and is a bit neater.
2021-10-08 18:13:41 +01:00
Ian McInerney c14bdf7fe0 pcb_calculator: Update panel images/text when system theme changes 2021-10-08 17:31:21 +01:00
jean-pierre charras a74851bb5d pcb_calculator rework: move transline panel to its own files panel_transline_xx
also a small code cleanup
2021-10-05 18:43:07 +02:00
jean-pierre charras d161d7431e pcb_calculator rework: move eseries panel to its own files panel_eserie_xx 2021-10-05 13:48:37 +02:00
jean-pierre charras 187c685c64 pcb_calculator rework: move board class panel to its own files panel_board_class_xx 2021-10-05 11:00:11 +02:00
jean-pierre charras c7faeeabea pcb_calculator rework: move electrical spacing panel to its own files panel_electrical_spacing_xx 2021-10-05 10:20:44 +02:00
jean-pierre charras f446d23deb pcb_calculator rework: move track width panel to its own files panel_track_width_xx 2021-10-05 08:41:22 +02:00
jean-pierre charras 3ac0b46798 pcb_calculator rework: move via size panel to its own files panel_via_size_xx 2021-10-04 16:32:38 +02:00
jean-pierre charras 5b5e9102bb pcb_calculator rework: move color code panel to its own files panel_color_code_xx 2021-10-04 15:02:57 +02:00
jean-pierre charras 21d3662ed3 pcb_calculator rework: move attenuators panel to its own files panel_attenuators_xx 2021-10-04 10:25:33 +02:00
jean-pierre charras 0f48522342 pcb_calculator rework: move regulator panel to its own files panel_regulator_xx
also rename regulators_funct.cpp to panel_regulator.cpp
2021-10-03 18:09:20 +02:00
Jeff Young 2479e1d7b1 Improve common settings property grouping.
Also moves apply-icon-scaling-to-fonts to its own checkbox.  (We used
to try to infer when to do it, but that turns out to be a rathole.)
2021-09-16 18:31:44 +01:00
Jeff Young b84d1456d5 KIFACE_I -> KIFACE_BASE. 2021-09-14 23:45:14 +01:00
Jeff Young 9c78e4cf54 Mac needs different font size handling than MSW & GTK.
Mac already uses diverse font sizes (for instance, smaller fonts for
radio button groups), and the anti-aliasing is a lot better.  The
other platforms need a more limited range of sizes.

Fixes https://gitlab.com/kicad/code/kicad/issues/8608
2021-09-11 23:40:31 +01:00
Jeff Young fbee62fc15 Tie font size scaling to when automatic icon scaling fails.
It appears that SetSymbolicSize() and ConvertDialogToPixes() fail
under the same circumstances.
2021-09-11 15:29:51 +01:00
Jeff Young 7a822b55aa Another round of changes to attempt to fix the GTK font size issue.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
2021-09-10 15:59:50 +01:00
Wayne Stambaugh 4c457b5ed3 More NULL expunging. 2021-07-18 14:31:55 -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
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Marek Roszko 551ddee29e Kick wx.h out of pcb_calculator src 2021-06-07 18:38:51 -04:00
Jon Evans b986797469 Move pcb calculator to new bitmap system
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8324
2021-05-03 22:28:25 -04: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
jean-pierre charras 2d609a795d PCB_CALCULATOR_FRAME: fix missing calls to Layout() after widgets modifications.
Fixes #7858
https://gitlab.com/kicad/code/kicad/issues/7858
2021-03-10 14:07:57 +01:00
jean-pierre charras 41061b5cb1 pcb_calculateur: fix truncation of row labels of wxGrid
this column had a fixed width, that does not work for translated texts
or large fonts.
Fixes #7607
https://gitlab.com/kicad/code/kicad/issues/7607
2021-02-20 16:22:55 +01:00
Jeff Young 29a1ded508 Fix degree symbol.
And then go on and do a boatload more fixes for correct units usage.
2021-02-15 18:37:10 +00:00
Jeff Young 5afc56e285 Because we (evidently) didn't have enough display hacks....
Also adds back menubar, which appears to be required for cmd-Q on Mac.
2021-02-14 12:15:26 +00:00
Jeff Young cb7add9280 Fix a few minor things in PCB Calc, and update units to SI.
Fixes https://gitlab.com/kicad/code/kicad/issues/7525

Fixes https://gitlab.com/kicad/code/kicad/issues/3435
2021-02-14 12:15:26 +00:00
Jeff Young 25f621e880 Fix a lot of GUI guideline issues in PCB Calculator.
Colons, capitalization, spacing, etc.

Also fixes another bitmap refresh bug on OSX.
2021-02-13 16:48:47 +00:00
Jeff Young 3f9841355d SVG-based regulator and attenuator bitmaps. 2021-02-13 16:48:47 +00:00
Jeff Young 2773bcf35b Use new SVG bitmaps for PCB Calculator.
They have transparent backgrouds so don't need the whiting out.  They
also suffer from pixellation a lot less.

Fixes https://gitlab.com/kicad/code/kicad/issues/7491
2021-02-12 22:08:19 +00:00
Jeff Young be6683b8b7 Fix cross-platform issue. 2021-02-12 15:56:01 +00:00
Jeff Young 55020ce2c7 Some more pcb calculator refresh hacks.
Also adjusts the spacing and decimal point in the E-series page.

Fixes https://gitlab.com/kicad/code/kicad/issues/5634
2021-02-12 13:53:29 +00:00
Jeff Young 9094ba8033 A veritable cornucopia of wxWidgets hacks for pcb calculator.
Most of these are display hacks because (at least on OSX) assigning
bitmaps or doing a layout before the controls are visible tends to
not work.  There are also some layout cleanups and some layout hacks
(horizontal radio button groups, for instance, lay out on top of each
other on OSX).

Fixes https://gitlab.com/kicad/code/kicad/issues/7491
2021-02-12 13:53:29 +00:00
Michael Kavanagh a4ab596b8d Icons: use standard arrows in PCB Calculator 2021-01-04 17:41:09 +00:00
Seth Hillbrand 61ac9c8d90 Add multiple size icons for programs
In theory, the WM should now choose the closest size icon for its
purpose, making it easier to distinguish in space-constrained settings

Fixes https://gitlab.com/kicad/code/kicad/issues/6798
2020-12-22 15:37:26 -08:00
Jeff Young a207bd97bb Naming conventions. 2020-11-17 16:05:49 +00:00
Marek Roszko 2ade8031dc Clean up pcb_calculator includes a bit and rename files 2020-10-12 22:01:43 -04:00
Janvi 1b56e2e95d ADDED: E-Series Resistor Calculator
Fixes https://gitlab.com/kicad/code/kicad/issues/2155
2020-09-15 14:03:07 +00:00
jean-pierre charras e3d9d5fa88 Pcb_calculator: add missing code to store its full config. 2020-08-24 12:40:38 +02: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 a25368cc6b Improve spelling.
The groundwork here is thanks to kunda1.

Fixes: lp:1831510
* https://bugs.launchpad.net/kicad/+bug/1831510
2019-08-20 19:14:05 +01:00
jean-pierre charras 66d2060942 Partial fix for missing language selection menu.
The fix is partial because in the list of languages the menuitem corresponding to the selected language is not checked.
2019-06-16 20:35:57 +02:00
jean-pierre charras 0359ffb6c7 * Fix a link issue issues on Windows, probably related toircular gal<->common dependency.
The fix used in commit 1e4abac57 to build kicad binary does not work for pcb_calculator.
So I used a ugly but basic trick to force linking some undefined functions found in gal lib.
This issue could be msys2 specific.
2019-06-11 16:20:28 +02:00
jean-pierre charras 460d1f2a15 pcb_calculator: code cleanup. Remove a few duplicate code. 2019-05-02 08:54:16 +02:00
Nabeel Ahmad 9f189ca71a pcb_calculator: New tab for via calculations
NEW: Adds a tab in pcb_calculator for calculations related to via size.

Fixes: lp:1802222
* https://bugs.launchpad.net/kicad/+bug/1802222
2019-04-30 11:49:46 -07: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