Commit Graph

1554 Commits

Author SHA1 Message Date
Isaiah Odhner
d61de649a6 Prevent focusing character input when closing dialogs 2024-11-10 23:37:52 -05:00
Isaiah Odhner
45b28f142f Add some dead code 2024-11-10 23:03:39 -05:00
Isaiah Odhner
6693560383 Place pasted selections similarly to cursor 2024-11-10 22:24:46 -05:00
Isaiah Odhner
f15cfa0148 Cleanup cursor placement math 2024-11-10 22:14:12 -05:00
Isaiah Odhner
25ecfa61f9 Prevent scrolling view when pressing Esc to hide cursor 2024-11-10 21:42:29 -05:00
Isaiah Odhner
fcc0329dae Create cursor at top left of viewport 2024-11-10 21:42:29 -05:00
Isaiah Odhner
62db73e328 Scroll cursor into view when moving cursor 2024-11-10 21:42:18 -05:00
Isaiah Odhner
e8cc107f55 Make cursor mode explicit
Before, a Selection object was considered a cursor if it was in
`textbox_mode` and its size was 1x1. Explicit is better than implicit.

However, it's still ugly since `textbox_mode` is still True for cursors,
which are not really textboxes... which are not really selections.
2024-11-08 17:30:57 -05:00
Isaiah Odhner
c43fef57fc Avoid changing cursor color temporarily when picking colors 2024-11-08 17:06:24 -05:00
Isaiah Odhner
9eae8a19e1 Note issue with multiple blinking cursors 2024-11-08 17:05:31 -05:00
Isaiah Odhner
2ae77c15d0 Add changelog note 2024-11-08 17:05:31 -05:00
Isaiah Odhner
4b390d884b Fix regression where CharInput defaults to focused
Originally the File menu was getting the default focus, though this was
not useful because the menus are not keyboard accessible yet, but when I
made the menu items not accept focus, the auto focus behavior became to
focus the CharInput, causing `pytest -k test_paint_app` to fail.
No focus makes more sense than the File menu item or the CharInput.
2024-11-08 17:05:31 -05:00
Isaiah Odhner
fa4d961fb4 Fix menu scrolling down when clicking menu items 2024-11-08 17:05:31 -05:00
Isaiah Odhner
652c2138e5 Fix missing import (and missing spelling) for test mark 2024-11-08 11:29:57 -05:00
Isaiah Odhner
2d659ef478 Fix missing word 2024-11-07 14:20:25 -05:00
Isaiah Odhner
a31e6a8f06 Organize Known Issues section 2024-11-07 14:16:11 -05:00
Isaiah Odhner
993bb03719 Note Edit > Paste file format limitation 2024-11-07 13:56:55 -05:00
Isaiah Odhner
688cb2f86f Mark incompatibility with Python 3.13 2024-11-07 13:40:27 -05:00
Isaiah Odhner
7ced8fc50b Add launch configuration to debug pip install 2024-11-05 16:02:42 -05:00
Isaiah Odhner
a2d117cd69 Add test for pasting emoji into CharInput 2024-11-05 16:01:40 -05:00
Isaiah Odhner
81ea6867c0 Add snapshot test for loading a PNG file
This regressed previously. Never again!
2024-11-05 11:08:20 -05:00
Isaiah Odhner
dcfb05c58a Use a separate folder for ANSI art for tests; add more gallery tests 2024-11-05 09:07:40 -05:00
Isaiah Odhner
4387c07e7b Save plain text with CRLF on Windows, fixing round-trip tests
The line endings of *.txt files are currently managed by git,
as specified in `.gitattributes`, which means they're checked out as
CRLF on Windows. I could either change the test to replace CRLF with LF
in the expected file content, or change `.gitattributes`, or change the
file saving itself to save different line endings per platform, and
the latter feels a bit better to me. Eventually it would be good to
support different line endings per file as well as different encodings,
with some auto-detection and a way to override the settings and reload.
2024-11-05 07:27:52 -05:00
Isaiah Odhner
0a0d509cd2 Update test snapshots
I added another ANSI art sample, which now shows up in the gallery app's
snapshot, invalidating the test. Maybe I should stop adding sample art.
Or better yet, I should create a separate folder with just two files
so that I can add sample art freely without breaking the tests:
  - one file that's small and centered
  - one file that's large with scrollbars

`pytest --snapshot-update`
2024-11-05 07:27:52 -05:00
Isaiah Odhner
d5448db34e Mark *.ambr as text 2024-11-04 23:47:16 -05:00
Isaiah Odhner
4994719f67 Restart cursor blink cycle when moving cursor or typing 2024-11-04 22:59:50 -05:00
Isaiah Odhner
788ce400bf Implement cursor blinking effect 2024-11-04 22:52:31 -05:00
Isaiah Odhner
4edd5ab4d7 Note worse variation of menu scrolling issue 2024-11-04 21:52:20 -05:00
Isaiah Odhner
24ea6ea260 Fix image files opening as blank white
Broken in: 00bd187d5a (diff-6e80bd629f0b2c3bd31e0cab96633495ea700649c14f5b147beac856bf5d61b3R648)
2024-11-04 21:52:20 -05:00
Isaiah Odhner
93abb6f871 Remove todo for issue that I can't reproduce 2024-11-04 21:20:48 -05:00
Isaiah Odhner
35860fbe1b Note errant commit found with git bisect 2024-11-04 21:20:25 -05:00
Isaiah Odhner
e519ad4613 Add to known issues list 2024-11-04 15:10:33 -05:00
Isaiah Odhner
1a4eab97de Add pyright to requirements.txt 2024-11-04 13:44:04 -05:00
Isaiah Odhner
d384f54d48 Configure pyright to check for Python 3.10 compatibility 2024-11-04 13:33:25 -05:00
Isaiah Odhner
00f249595e Fix compatibility with Python < 3.12
Prior to Python 3.12, f-string interpolations cannot contain the quote
character used to delimit the f-string.
2024-11-04 11:58:41 -05:00
Isaiah Odhner
dd331812eb Reset focus when pressing Escape 2024-11-04 01:09:52 -05:00
Isaiah Odhner
0a715fff5d Fix double-acting arrow keys with dialog open 2024-11-04 01:02:15 -05:00
Isaiah Odhner
b0e478cae0 Fix errors when interacting with command palette 2024-11-04 01:02:15 -05:00
Isaiah Odhner
9f285f2d9d Add sample text art of text 2024-11-04 01:02:15 -05:00
Isaiah Odhner
ce9b9d6fcb Create initial cursor with keyboard 2024-11-04 01:02:15 -05:00
Isaiah Odhner
637284fe71 Restore cursor position after redoing free-typing 2024-11-03 23:16:14 -05:00
Isaiah Odhner
8b6462ba44 Restore cursor position after undoing free-typing 2024-11-03 23:03:37 -05:00
Isaiah Odhner
b5ea2e5970 Make backspace delete to left in free typing mode
I reworked this so it edits the image directly, creating undo states
immediately when you type instead of when the textbox is later melded.
Now it can edit a different cell without complicating the code, as the
edits are done directly within the cursor movement code instead of
later when the 1x1 textbox is melded into the canvas.
2024-11-03 23:00:31 -05:00
Isaiah Odhner
c7a6bc112b Switch to RegexMatchingEventHandler 2024-11-02 13:23:07 -04:00
Isaiah Odhner
fc269f3a90 Update watchdog to 6.0.0
Doesn't fix ignore patterns not working on Windows.
2024-11-02 11:49:54 -04:00
Isaiah Odhner
2a3c3f2d1d Skip invalid file descriptors 2024-11-02 11:43:49 -04:00
Isaiah Odhner
00decf8217 Add notes about annoying things detracting from real work 2024-11-02 11:43:49 -04:00
Isaiah Odhner
f7b94181bc Override launch task program paths for Windows 2024-11-02 11:01:19 -04:00
Isaiah Odhner
0a48cb499e Update deprecated launch config type 2024-11-01 11:54:39 -04:00
Isaiah Odhner
40b2b1b1a1 Catch ImportError to tweak error message 2024-10-31 23:40:51 -04:00