Commit Graph

243 Commits

Author SHA1 Message Date
david-beinder bab13debcb Improve overbar rendering in PCB and global labels
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8584
Moves the font slightly down in global labels
Keeps font with overbar at the same size in PCB OpenGL renderer
2021-08-02 16:40:36 +00:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh cb72da294a More NULL expunging. 2021-07-16 16:13:41 -04:00
Jeff Young 3288971a7c Allow titleblock vars to be resolved outside the titleblock.
Also implements some variable resolving for Altium imports.
2021-07-06 13:30:17 +01:00
Jeff Young 64f07ea9c6 Update text variables after changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/8697
2021-06-29 13:55:06 +01:00
Jeff Young ceb23c3aac Don't display legacy placeholder for empty string ("~"). 2021-06-12 18:58:15 +01:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Wayne Stambaugh 9ebabb222c Pass objects by reference instead of on the stack. 2021-06-08 10:09:38 -04:00
Marek Roszko 4df3cb912d Remove another leaky wx/log.h header 2021-06-03 08:11:15 -04:00
Marek Roszko 5f581aa6ad Move some LABEL_SPIN_STYLE to the cpp to add back warnings 2021-06-02 00:26:16 -04:00
Wayne Stambaugh ebd53cd45c Eeschema: fix text justification terminology.
Use justification instead of orientation relative to the anchor point when
describing text direction and alignment.  This seems to be the preferred
method by most users so hopefully this will eliminate some confusion.

Fix a bug in the s-expression schematic parser that failed to take into
account how graphical text alignment is defined for graphic text objects
compared to label text objects.

Fixes https://gitlab.com/kicad/code/kicad/issues/6489
2021-05-14 13:44:17 -04:00
Jeff Young c7d689a022 Show field children when creating new labels.
And in particular, show reasonable intersheet reference facsimiles.
2021-04-02 15:15:07 +01:00
Jeff Young 7a13ad7b17 Consistent naming. 2021-03-19 23:06:19 +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
jean-pierre charras 2bc22de1a5 Eeschema: fix crash when opening preferences, due to null pointer.
In panel preview, Schematic() returns a null pointer.
Fixes #7869
https://gitlab.com/kicad/code/kicad/issues/7869
2021-03-11 08:20:27 +01:00
jean-pierre charras 33f465f754 SCH_GLOBALLABEL::GetBoundingBox(): do not include IREF when not shown. 2021-03-10 18:38:38 +01:00
jean-pierre charras d295b5d6de SCH_GLOBALLABEL: fix broken position of IREF, creating a broken bounding box.
Note also the bounding box is too large when the IREF  is not shown, because
IREF is always included, even if not shown.
Fixes #7864
https://gitlab.com/kicad/code/kicad/issues/7864
2021-03-10 17:58:44 +01:00
Jeff Young e4590e4762 Make sure SCH_GLOBALLABEL's bounding box includes its intersheet ref.
Fixes https://gitlab.com/kicad/code/kicad/issues/7819
2021-03-09 12:08:33 +00:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
Franck Jullien c16199c3f9 eeschema: add a setting to allow intersheets to not list their own page
Also disable inter-sheet options when "Show inter-sheet references" is
not checked.
2021-03-08 20:40:37 +00:00
Jeff Young b9d26a55f2 Show variable references of text in status bar.
Fixes https://gitlab.com/kicad/code/kicad/issues/7790
2021-03-03 18:58:04 +00:00
Seth Hillbrand f73039cb18 Fix wire endings both too small and too large
Junctions should only be wire endings when ending directly on the wire.
This is the requirement for netlisting, so we need to follow it in the
auto-end as well.

SCH_LABEL needs to allow ending because any wire that touches the label
will be connected, so there's a use case for this.  However, the
bounding box for local labels did not include their connection point, so
we increase that box a bit.  Note that this might have the opposite
effect to https://gitlab.com/kicad/code/kicad/-/issues/7689

Fixes https://gitlab.com/kicad/code/kicad/issues/7714
2021-02-25 16:27:05 -08:00
Jon Evans 92cc88f87c Tighten up schematic label bounding boxes
Margins were being added in more places than necessary

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7689
2021-02-24 17:15:35 -05:00
Wayne Stambaugh 1786ae8773 Eeschema: use symbol nomenclature for object file naming. 2021-02-24 08:48:02 -05:00
Jeff Young 2a7e60960a Use standard mirror icons & terminology.
Also use standard group icons.

Also put both (and rotate commands) in toolbar.

Fixes https://gitlab.com/kicad/code/kicad/issues/7504
2021-02-16 21:11:36 +00:00
Zoltan Gyarmati 17b0117074 eeschema: fixing intersheet ref mirroring for global labels
Implementing Mirror{X,Y} overrides in SCH_GLOBALLABEL in order
to properly handle Intersheet Ref field mirroring.

Fixes: https://gitlab.com/kicad/code/kicad/issues/7225
2021-02-05 19:55:54 +00:00
Jeff Young 8dfd297ee2 Show all pages for intersheet refs, and use IDs in hypertext menu.
Fixes https://gitlab.com/kicad/code/kicad/issues/7253
2021-01-25 00:55:38 +00:00
Jeff Young f1221a9ca3 Resolve text variables in title blocks for outputing to netlist.
Fixes https://gitlab.com/kicad/code/kicad/issues/7153
2021-01-17 16:24:22 +00:00
Jeff Young bd786b578a Labels on pins should be considered "wire labels".
Fixes https://gitlab.com/kicad/code/kicad/issues/7120
2021-01-15 21:07:45 +00:00
Dominik Wernberger bb2881a5ab Make RENDER_SETTINGS argument const 2021-01-12 20:51:31 +00:00
Jeff Young 3d852372ca Handle nested unescaping (for buses in particular).
Also adds a few missing unescape() calls when showing netnames to the
user.

Fixes https://gitlab.com/kicad/code/kicad/issues/6400
2020-12-20 15:59:09 +00:00
Jeff Young 11117a2d9a Fix invalid access into empty string. 2020-12-17 14:18:27 +00:00
Franck Jullien 70cbf59846 eeschema/intersheet: don't list own page 2020-12-15 01:06:00 +00:00
Jeff Young 9dae57ae9d Fix several bugs in SCH color printing and plotting.
Fixes https://gitlab.com/kicad/code/kicad/issues/6723
2020-12-13 22:43:09 +00:00
Jeff Young 2050e05944 Formatting. 2020-12-04 14:48:48 +00:00
Franck Jullien 8d72a768e0 eeschema/intersheet: add print and plot functions 2020-12-04 14:46:42 +00:00
Peter Montgomery 821128cb8e Eeschema: Make auto-decrementing net labels stop at zero
CHANGED: If you set the auto-increment value to a negative number,
created a net label and hit the insert key, when the name got below zero,
the net labels tried to go negative but created bad labels instead.
Now the code caps decrementing at zero,  warns users when it has
happened, and explains why.

Fixes https://gitlab.com/kicad/code/kicad/issues/6537
2020-12-04 12:48:32 +00:00
Jeff Young 050d9e37ec Fix rotation bugs in Eeschema.
Rotate text using the Rotate90() function which gets the orientation
right.

Also, when calculating the center point for rotation, don't include
labels if the selection contains other stuff.  It just makes the
rotation odd, and tends to cause walking when continuing to rotate
(due to keep-upright being non-symmetrical).

Fixes https://gitlab.com/kicad/code/kicad/issues/git
2020-11-24 18:19:35 +00:00
Jeff Young 1f5831185e Fix rotation of multiple global labels with intersheet references. 2020-11-21 23:44:26 +00:00
Jeff Young 7c344e9be6 Mirroring for intersheet references. 2020-11-18 23:34:27 +00:00
Jeff Young 293795fd46 Support rotation on intersheet references. 2020-11-18 23:34:27 +00:00
Jeff Young c1d1c12b41 Simplify message panel code.
We've had the colours turned off for two releases now without any
screaming or gnashing of teeth, so it's time to clean up the code.
2020-11-18 17:32:40 +00:00
Marek Roszko 16e3e59495 Split out arrayDim and MIRROR templates from macros.h
These were not macros
2020-11-17 20:21:04 -05:00
Jeff Young 8c5c902fa3 Re-write IntersheetRefs on top of SCH_FIELDs and textVars.
1) Generalize SCH_ITEM owners (SCH_COMPONENT, SCH_SHEET, and now
SCH_GLOBALLABEL)
2) Generalize hypertext items
3) Use SCH_FIELD autoplace infrastructure for placing intersheet
references
4) Use textVar infrastructure for buildin intersheet references.

As an important side-effect this also fixes the undo issues with
intersheet refs.
2020-11-17 16:05:49 +00:00
Jeff Young 7bd31d5237 Naming conventions. 2020-11-14 18:26:03 +00:00
Jeff Young 8bae52d1c3 Correct naming conventions. 2020-11-14 14:29:11 +00:00
Jeff Young 592cd99fd5 Pin dialog min size so that we don't wrap our (hacked) overbars.
Fixes https://gitlab.com/kicad/code/kicad/issues/6371
2020-11-13 17:55:54 +00:00
Marek Roszko 9de0ff22c1 Rename Mirror template to MIRRORVAL to avoid shadowing
I am bad at naming creativity here, but hey, it's unique
2020-10-25 20:44:22 -04:00
Marek Roszko e49ac45b84 HTML_MESSAGE_BOX is a dialog 2020-10-25 20:01:12 -04:00
Marek Roszko a785f70ea1 msgpanel is a widget, shove it to the right folder. 2020-10-25 20:01:12 -04:00