Commit Graph

58 Commits

Author SHA1 Message Date
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
Maciej Suminski a9efbf4716 Fixed memory leaks 2018-12-11 16:21:43 +01:00
Simon Richter 758d5727b0 Minor string fixes 2017-12-18 18:09:48 +01:00
Simon Richter a9ccf1161b Fix quotes in UI messages
This replaces all single and angle bracket quotes in UI messages with
double quotes, for consistency.

Sorry to all translators.
2017-12-15 07:33:07 -05:00
jean-pierre charras 9de24b15ae Pcb_calculator: Fix a bug which prevents the pcb_calculator to write and read correctly its configuration file.
* Cosmetic enhancements in transmission lines panel.
* Fix very minor cosmetic issues in track width versus current panel
2015-08-09 11:03:25 +02:00
unknown 61818578fb PCB calculator enhancement: track width units change auto-recalculation:
* Automatically update results on input change
* Allow user to specify trace width and calculate maximum current it can handle
* Allow the trace thickness to be set separately for external and internal layers
* Allow specification of the resistivity
* Change the non-editable text boxes (resistance, power loss etc) to labels
2015-08-09 09:15:42 +02:00
jean-pierre charras de8ae428fd Minor fixes (typo in messages) 2014-12-30 18:15:46 +01:00
Moses McKnight 6da5e2cdd0 Configuration file consolidation patch from Moses McKnight.
* Create GetNewConfig() and GetKicadConfigPath() to unify configuration file
  creation and location.
* Move Windows configuration out of the registry into configuration files.
* Move Linux configuration files from $HOME to $HOME/.config/kicad to eliminate
  configuration file pollution in the users $HOME folder.
* Fix a bug in the configuration file where the Eeschema hot keys are saved.
2014-09-05 17:12:38 -04:00
Dick Hollenbeck 991926d320 Modular-Kicad milestone B), major portions:
*) Rework the set language support, simplify it by using KIWAY.  Now any major
   frame with a "change language" menu can change the language for all KIWAY_PLAYERs
   in the whole KIWAY.  Multiple KIWAYs are not supported yet.

*) Simplify "modal wxFrame" support, and add that support exclusively to
   KIWAY_PLAYER where it is inherited by all derivatives.  The function
   KIWAY_PLAYER::ShowModal() is in the vtable and so is cross module capable.

*) Remove the requirements and assumptions that the wxFrame hierarchy always
   had PCB_EDIT_FRAME and SCH_EDIT_FRAME as immediate parents of their viewers
   and editors. This is no longer the case, nor required.

*) Use KIWAY::Player() everywhere to make KIWAY_PLAYERs, this registers the
   KIWAY_PLAYER within the KIWAY and makes it very easy to find an open frame
   quickly.  It also gives control to the KIWAY as to frame hierarchical
   relationships.

*) Change single_top to use the KIWAY for loading a KIFACE and instantiating
   the single KIWAY_PLAYER, see bullet immediately above.

*) Add KIWAY::OnKiwayEnd() and call it from PGM_BASE at program termination, this
   gives the KIFACEs a chance to save their final configuration dope to disk.

*) Add dedicated FRAME_T's for the modal frames, so m_Ident can be tested and
   these modal frames are distinctly different than their non-modal equivalents.
   KIWAY_PLAYER::IsModal() is !not! a valid test during the wxFrame's constructor,
   so this is another important reason for having a dedicated FRAME_T for each
   modal wxFrame.

On balance, more lines were deleted than were added to achieve all this.
2014-05-03 12:40:19 -05:00
jean-pierre charras 262ec8920a Minor fixes for Windows: move resources from dso to .exe, to have the application icon in executable, and therefore shown in shortcuts.
pcb_calculator: minor coding style fix.
2014-03-22 09:28:39 +01:00
Dick Hollenbeck 2c67c3ff80 * KIWAY Milestone A): Make major modules into DLL/DSOs.
!   The initial testing of this commit should be done using a Debug build so that
    all the wxASSERT()s are enabled.  Also, be sure and keep enabled the
    USE_KIWAY_DLLs option.  The tree won't likely build without it.  Turning it
    off is senseless anyways.  If you want stable code, go back to a prior version,
    the one tagged with "stable".

*   Relocate all functionality out of the wxApp derivative into more finely
    targeted purposes:
    a) DLL/DSO specific
    b) PROJECT specific
    c) EXE or process specific
    d) configuration file specific data
    e) configuration file manipulations functions.

    All of this functionality was blended into an extremely large wxApp derivative
    and that was incompatible with the desire to support multiple concurrently
    loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
    An amazing amount of organization come from simply sorting each bit of
    functionality into the proper box.

*   Switch to wxConfigBase from wxConfig everywhere except instantiation.
*   Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
    PGM_SINGLE_TOP,
*   Remove "Return" prefix on many function names.
*   Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
*   Fix building boost for use in a DSO on linux.
*   Remove some of the assumptions in the CMakeLists.txt files that windows had
    to be the host platform when building windows binaries.
*   Reduce the number of wxStrings being constructed at program load time via
    static construction.
*   Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
    these functions are useful even when the wxConfigBase comes from another
    source, as is the case in the KICAD_MANAGER_FRAME.
*   Move the setting of the KIPRJMOD environment variable into class PROJECT,
    so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
*   Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
    its child wxFrames and wxDialogs now have a Kiway() member function which
    returns a KIWAY& that that window tree branch is in support of.  This is like
    wxWindows DNA in that child windows get this member with proper value at time
    of construction.
*   Anticipate some of the needs for milestones B) and C) and make code
    adjustments now in an effort to reduce work in those milestones.
*   No testing has been done for python scripting, since milestone C) has that
    being largely reworked and re-thought-out.
2014-03-19 19:42:08 -05:00
Wayne Stambaugh bed96be750 Internal unit improvements and Pcbnew s-expression file format changes.
* Move EDA_TEXT object into separate header and source file.
* Compile EDA_TEXT class separately for BOARD_ITEM and SCH_ITEM units.
* Compile PAGE_INFO  class separately for BOARD_ITEM and SCH_ITEM units.
* Minor formatting tweaks to Pcbnew s-expression file.
* Move internal unit formatting functions into BOARD_ITEM and SCH_ITEM.
2012-04-12 17:31:31 -04:00
jean-pierre charras 100ea3a59b Finish Pcb Calculator work 2012-04-05 20:56:06 +02:00
Andrey Fedorushkov e4309287bf pcb_calc: fix build in linux distrib Mageia1 with wxgtk2.8-2.8.11-4.mga1 2012-04-04 21:08:16 +04:00
jean-pierre charras 70cf189132 pcb_calculator: fixes and enhancements (not finished) 2012-04-03 20:26:05 +02:00