Commit Graph

54 Commits

Author SHA1 Message Date
Jeff Young e17d81cf6d Re-enter auto-complete on a ctrl-space.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16445
2023-12-27 21:14:27 +00:00
jean-pierre charras a60411b159 Fix a few compil and Coverity minor warnings. 2023-10-03 08:22:03 +02:00
Jeff Young 34769cec63 Filter line-endings from single-line Scintilla editors.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15793
2023-10-01 14:04:45 +01:00
Jeff Young 686dfba77a ADDED autocomplete for value field in Symbol Properties dialog. 2023-08-02 20:45:52 +01:00
Jeff Young c2f2247ae3 Don't process SCINTILLA_TRICKS onCharHook when autocomplete is active.
(ESC being the exception that proves the rule.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15001
2023-06-28 00:05:38 +01:00
Jeff Young b3235ce667 Handle some Mac-standard keyboard shortcuts in Scintilla.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14973
2023-06-16 17:19:18 +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 e1db4e0694 Add backspace modifier handling to SCINTILLA_TRICKS.
Fixes https://gitlab.com/kicad/code/kicad/issues/13910
2023-05-08 18:42:04 +01:00
Mike Williams b32ba16da4 UI: Add Numpad Enter as "Return" equivalent in missing places
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14244
2023-03-10 16:25:17 -05:00
Jeff Young 87eb4401e3 Add Scintilla support to WX_GRID. 2023-02-21 13:32:01 +00:00
Jeff Young bb1eb94aa0 Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/issues/12467
2022-09-22 10:53:42 +01:00
Jeff Young 7e8b6083f4 Try to find a better brace highlight color strategy.
Fixes https://gitlab.com/kicad/code/kicad/issues/12467
2022-09-20 13:31:38 +01:00
Jeff Young 1b104f20b6 Don't give Scintilla a colour with alpha; it doesn't know what to do.
Fixes https://gitlab.com/kicad/code/kicad/issues/10829
2022-09-11 13:08:31 +01:00
Jeff Young c3a5947fe6 Make Scintilla paste a separate undo operation.
Fixes https://gitlab.com/kicad/code/kicad/issues/11756
2022-07-26 18:45:02 +01:00
Jeff Young dead84e7a1 A right-to-left single-char sel followed by typing leaves cursor the same.
Fixes https://gitlab.com/kicad/code/kicad/issues/11349
2022-04-07 11:51:58 +01:00
Jeff Young 3fddf0414b A bit of wxT(). 2022-03-11 20:52:11 +00:00
Scott Candey 23fdbe4b21 Common: Corrects Mac OS text navigation shortcuts in Scintilla
Ctrl-A moves cursor to beginning of current line in text box.
Ctrl-E moves cursor to the end of the line.
This change makes navigation in Scintilla text boxes consistent
with other text boxes in KiCad.

Fixes https://gitlab.com/kicad/code/kicad/issues/9996
2022-01-17 14:31:06 +00:00
Mikolaj Wielgus 9efbeaa064 Dark theme support for SPICE model editor 2021-12-03 03:41:32 +01:00
jean-pierre charras 33454ef8d2 Ensure the end of line char is '\n' in wxStyledTextCtrl when using SCINTILLA_TRICKS. 2021-11-29 15:30:38 +01:00
Jeff Young 212666e987 Allow theme to change text color of highlighted text.
Fixes https://gitlab.com/kicad/code/kicad/issues/9716
2021-11-21 22:54:16 +00: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
Jon Evans 43c85771eb Fix paste into Scintilla fields on macOS
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9473
2021-11-12 23:25:44 -05:00
Seth Hillbrand 4852a8afa1 Set Scintilla cursor color for themes
Updates cursor to be visible even in dark themes

Fixes https://gitlab.com/kicad/code/kicad/issues/9398
2021-10-14 10:10:55 -07:00
Jeff Young c38de1dcaf Pull back some 7.0 fixes to Custom Rules code completion. 2021-09-23 13:08:31 +01:00
Jeff Young 7a993c0211 Add support mode for dark mode to SCINTILLA_TRICKS.
Also removes the return value from the BITMAP_STORE's themeChanged
method as it will provide the wrong answer for the second frame it's
called on.

Also hooked up ACTION_TOOLBAR, the app launcher, and the project tree
to the wx event for system color changes so they change on the fly.

Fixes https://gitlab.com/kicad/code/kicad/issues/6026
2021-09-14 00:18:50 +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
Jeff Young a2cb3e916a Add a couple of OSX-standard keyboard cmds to Scintilla.
Fixes https://gitlab.com/kicad/code/kicad/issues/8865
2021-07-27 15:15:49 +01:00
Jeff Young 9975b8fb10 Attempt to handle deleting double-byte chars in Scintilla. 2021-07-08 20:44:04 +01: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 cbe7f9057b Add link to wxWidgets bug report. 2021-06-25 10:09:49 +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
Marek Roszko 4df3cb912d Remove another leaky wx/log.h header 2021-06-03 08:11:15 -04:00
Roberto Fernandez Bautista 9aedeae5c3 Don't log error messages when using the clipboard
wxClipboard::GetData()and wxClipboard::SetData() both log a "wxLogSysError" error-level message (see for example:  https://github.com/wxWidgets/wxWidgets/blob/v3.1.4/src/msw/clipbrd.cpp#L703 ). This logged message gets displayed as a messagebox to the user.

The logging can be disabled temporarily by creating a wxLogNull object. See https://docs.wxwidgets.org/3.0/classwx_log_null.html

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6956
2021-02-03 01:55:05 +00:00
Seth Hillbrand 02f91c52a0 Avoid nag confirmation in scintilla
If we need to confirm abandoning changes, we need to do it in the dialog
where we check for dialog changes.
2021-01-24 12:31:04 -08:00
Jeff Young d5d9372839 Don't cancel dialog when esc-ing out of autocomplete. 2021-01-23 22:55:03 +00:00
jean-pierre charras e4675ee9a6 Fix missing include (linux). 2020-10-19 10:25:55 +02:00
jean-pierre charras 539ac4c214 Remove a few include<wx/wx.h> in many files that do not actually use this include. 2020-10-19 09:00:50 +02:00
Jeff Young 53389442b8 Add Ctrl+A (select all) to scintilla tricks.
Fixes https://gitlab.com/kicad/code/kicad/issues/5538
2020-09-07 12:36:48 +01:00
Jeff Young f2e0b4a6f6 Work around wxWidgets to produce a Ctrl-/.
Fixes https://gitlab.com/kicad/code/kicad/issues/5480
2020-09-06 18:46:44 +01:00
Jeff Young 4354fa7bde Another try at a solution for ctrl-/.
Fixes https://gitlab.com/kicad/code/kicad/issues/5480
2020-09-05 22:44:00 +01:00
Jeff Young c1889cefcf Try to make block-quote/unquote more keyboard-variation-friendly.
Fixes https://gitlab.com/kicad/code/kicad/issues/git
2020-09-04 20:47:50 +01:00
Jeff Young 3573c8b967 ADDED hotkey for comment/uncomment line(s) in Scintilla.
Useful primarily for DRC Rules editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/5480
2020-09-03 20:37:05 +01:00
Jeff Young 0b17dbd123 Fix nesting issues in the DRC rule expression code generator.
We were executing function calls multiple times because we were
processing them at a depth the traversal algorithm wasn't expecting.
2020-08-13 18:36:10 +01:00
Jeff Young de6314e3b5 Convert smart quotes and dashes to ASCII in DRC rules.
Fixes https://gitlab.com/kicad/code/kicad/issues/5135
2020-08-10 23:43:24 +01:00
Jeff Young 86c9adbcba Add auto-completion for DRC rule function calls. 2020-07-22 21:28:02 +01:00
Jeff Young e9da02e2d5 Only reserve hotkeys for focused textCtrls that are editabled.
Otherwise just send Ctrl-C to the disabled control, and everything
else to the tool framework.

Fixes https://gitlab.com/kicad/code/kicad/issues/4801
2020-07-14 13:30:43 +01:00
Ian McInerney 4d6abfdf05 Fix DELETE in Scintilla
The previous method would act like backspace at the end
of the string
2020-06-05 14:24:26 +01:00
Jeff Young 22b8133108 Change DELETE behaviour from delete sel to delete forward.
In other words, if there's no selection delete the character in
front of the cursor.

Fixes https://gitlab.com/kicad/code/kicad/issues/4609
2020-06-05 14:09:09 +01:00
Jeff Young 0741bbb1b9 Move autocomplete to the remove filtered items paradigm.
Fixes https://gitlab.com/kicad/code/kicad/issues/4190
2020-05-30 20:09:09 +01:00