Commit Graph

110 Commits

Author SHA1 Message Date
jean-pierre charras 8762859c6d Fix a display issue in wxStyledTextCtrl widgets in dialogs (Windows specific).
It happens when a text is using some esoteric unicode chars.
Fixes #15314
https://gitlab.com/kicad/code/kicad/-/issues/15314
2023-08-03 18:35:49 +02:00
Jeff Young 686dfba77a ADDED autocomplete for value field in Symbol Properties dialog. 2023-08-02 20:45:52 +01:00
Mike Williams b81fcaeaf7 PCB Fields: use validators in dialogs, restrict editing of footprint 2023-06-20 18:34:52 +00:00
Mike Williams 74606cda9c PCB: text properties dialog should indicate "Offset X/Y:" properly 2023-06-20 18:34:52 +00:00
Mike Williams 6d93950dcc PCB: abolish TEXT_TYPE::TEXT_is_*
PCB_TEXT is now always what was formerly TEXT_is_DIVERS and PCB_FIELDs
now what mandatory field type they are already.
2023-06-20 18:34:52 +00:00
Jeff Young 3b8cc3a3ac Tab-order fix provided by aris-kimi.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9406
2023-06-17 18:41:17 +01:00
Jeff Young 5875f89531 Centralize text size clamping.
Also introduces alg::clamp to improve readability of
std::max( min, std::max( value, max ) )

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14876
2023-06-03 20:29:51 +01:00
Jeff Young 1518ddde74 Push much of text var autocomplete down into SCINTILLA_TRICKS.
Shared code == fewer bugs.  Well, in theory anyway....
2023-05-25 10:24:50 +01:00
Jeff Young 14f004d2a5 Hook up text variable auto-complete for PCBNew.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14777
2023-05-25 10:24:50 +01:00
Jeff Young bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
Felix Schneider 08295c795b Add vertical justification buttons to pcbnew text dialog
kicad 6 default behaviour was not achievable through the UI.
Addresses #13423 and #2375
2023-01-16 18:40:08 +00:00
Jeff Young 7ffdfb1067 Clear Scintilla undo history after setting initial text.
Fixes https://gitlab.com/kicad/code/kicad/issues/12650
2022-10-14 22:01:20 +01:00
Jeff Young 52bc2511cd Add a radioButton mode to IMAGE_BUTTON.
Fixes https://gitlab.com/kicad/code/kicad/issues/11797
2022-06-12 20:09:46 +01:00
Jeff Young 32a2490677 Prefer -90 to 270 for text rotation in dialog boxes.
Fixes https://gitlab.com/kicad/code/kicad/issues/9868
2022-04-10 22:43:44 +01:00
Jeff Young 293021c58c ADDED: knockout pcb and fp text.
Fixes https://gitlab.com/kicad/code/kicad/issues/7055
2022-03-08 13:22:20 +00:00
Jeff Young 7ccac79192 More wxString wide literals. 2022-02-05 21:29:34 +00:00
Jeff Young 3f98769a77 More EDA_ANGLE.
Includes bug fix for catastrophic error in Add() for converting to
radians.

Includes bug fixes for the fact that the pcbnew test can't seem to
find the ANGLE_* objects (getting all 0's instead).
2022-01-15 01:30:04 +00:00
Jeff Young 1b19ff5f42 More EDA_ANGLE changes. 2022-01-14 16:08:19 +00:00
Jeff Young abd3f5bc2b Move footprints to EDA_ANGLE. 2022-01-14 16:08:18 +00:00
Jeff Young a2030a5956 GUI for font selection. 2022-01-08 16:47:45 +00:00
Jeff Young 86cb57f4a7 Cherry-pick TEXT_ATTRIBUTES and EDA_ANGLE from rockola/kicad-strokefont 2021-12-28 22:15:20 +00:00
Jeff Young c3552a940a Make sure standard OK/Cancel buttons respond to current language.
Fixes https://gitlab.com/kicad/code/kicad/issues/9635
2021-12-24 18:13:11 +00:00
Jeff Young c6d4a9f0b2 Button bar for PCBNew Text Properties dialog. 2021-12-24 17:39:00 +00:00
jean-pierre charras b8b8c0d34c dialog text properties: fix a focus issue.
Fixes #9792
https://gitlab.com/kicad/code/kicad/issues/9792
2021-11-27 10:08:30 +01:00
Seth Hillbrand 766a09c338 Remove autocomplete when we lose focus
Prevents the excess dropdown from persisting over windows

Fixes https://gitlab.com/kicad/code/kicad/issues/9651
2021-11-19 17:24:16 -08:00
Jeff Young 22ba640c2b Remove locking from footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/9496
2021-10-31 16:33:03 +00:00
Seth Hillbrand ad85f8078a Reverse escaping when transferring multi-line
We escape the strings coming out of the DIALOG_TEXT_PROPERTIES window,
so we need to unescape the ones coming in

Fixes https://gitlab.com/kicad/code/kicad/issues/9327
2021-10-06 13:25:03 -07: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
Jeff Young f013dbc7c4 More uniform handling of status fonts.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
2021-09-08 21:34:22 +01: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 cf00319c85 More NULL expunging. 2021-07-20 07:27:18 -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
Jeff Young d296bec5b8 Differentiate aSingleLine mode for SCINTILLA_TRICKS
This allows us to avoid the monospaced font (along with the tab-stop
handling), and process a <return> as an OK rather than just <shift> +
<return>.

Fixes https://gitlab.com/kicad/code/kicad/issues/8425
2021-06-28 11:20:12 +01:00
Jeff Young 27804e40e2 Go back to using space-width for tabs (instead of max-char-width).
The max-char-width impl was buggy and never applied to PCBNew anyway.
Plus the stroke font has a max-char-width of 2.8 time the space width,
so it made for really wide tab spacing.

Also fixes a bug where the Scintilla editors weren't getting a
monospace font on Mac.  (This bug may also exist on the other
platforms, but each would need its own fix.)

Also moves more of the Scintalla customizations to SCINTILLA_TRICKS
where they can be shared.

Fixes https://gitlab.com/kicad/code/kicad/issues/8666
2021-06-24 23:53:27 +01:00
Michal Schulz 38f18d0505 Fixed according to KiCad Style Guide. 2021-06-15 14:59:04 +00:00
Michal Schulz aed0352828 pcbnew: Replace CR inserted on macOS instead of LF when CTRL+Enter is pressed. 2021-06-15 14:59:04 +00:00
Marek Roszko dd9b8a9f73 Remove pcbnew.h includes in headers 2021-06-06 08:25:28 -04:00
Jeff Young faf9cca938 Fix many cases of old mils flag getting interpreted as allowEval flag.
Fixes https://gitlab.com/kicad/code/kicad/issues/7883
2021-03-12 15:15:50 +00:00
jean-pierre charras be25b7a132 Use ShowQuasiModal to show a few dialogs.
This change is mainly due to the fact Modal dialogs do not work when our
current tool is the tool used to create new item (text, zone, graphic).
If when this tool is active, one try to edit the properties of the new item
being created (or being placed) the modal dialog does not capture the event tool
and hangs (cannot be dismissed)
Our quasi modal dialogs have their own event loop and work.
Fixes #7585
https://gitlab.com/kicad/code/kicad/issues/7585
2021-02-20 14:24:57 +01:00
Jeff Young 05d2053ded Put MSW bug fix back in. 2021-02-10 12:37:13 +00:00
Seth Hillbrand 09be44a352 Use Jeff's method+font for monospace 2021-02-09 12:14:17 -08:00
Jeff Young 65c41cff42 Another way to set fixed-width font (that works on OSX). 2021-02-09 18:46:04 +00:00
Seth Hillbrand 6f0424d742 Use monospace font for textboxes
Matches the spacing of our stroke font so the tabs are correctly
displayed in WYSIWYG

Fixes https://gitlab.com/kicad/code/kicad/issues/1807
2021-02-08 15:59:58 -08:00
Jeff Young 26bc29808a Clean up Text Properties dialog.
It's no longer used for dimensions so doesn't need the line thickness
controls.

The spacing was a bit wonky.

Changed to disabling rather than hiding visibility checkbox.  The less
the GUI moves around the better.
2021-01-18 15:20:15 +00:00
jean-pierre charras d4c36230d2 Pcbnew, Graphic items: show the locked status in msg panel and dialog properties. 2021-01-12 10:00:21 +01:00
Jeff Young 419d8dcd6f Minor cleanup. 2021-01-01 23:42:44 +00:00
Seth Hillbrand f8f34982c0 Escape PCB text
Also keep a fail-safe for unescaping strings that are not previously
escaped

Fixes https://gitlab.com/kicad/code/kicad/issues/6901
2020-12-31 17:17:27 -08:00