Commit Graph

773 Commits

Author SHA1 Message Date
Isaiah Odhner
1911b11a13 Postpone auto-save until there is no tool preview in the image data 2023-05-05 21:59:50 -04:00
Isaiah Odhner
2a6ad003d8 Discard backup file on (normal) exit 2023-05-05 21:52:17 -04:00
Isaiah Odhner
ce4fabd923 Add --backup-folder option 2023-05-05 21:51:25 -04:00
Isaiah Odhner
d12942700a Tweak auto-save backup file name 2023-05-05 21:50:42 -04:00
Isaiah Odhner
3cdc308b95 Optionally singularize a word 2023-05-05 20:03:15 -04:00
Isaiah Odhner
40496c312f Clarify filename argument 2023-05-05 19:59:10 -04:00
Isaiah Odhner
2af9f4fd53 Auto-save to ~ files 2023-05-05 19:59:10 -04:00
Isaiah Odhner
a792b7a132 Get path to readme relative to the Python script 2023-05-05 19:46:08 -04:00
Isaiah Odhner
f15ce6962c DRY file writing with error handling 2023-05-05 19:24:01 -04:00
Isaiah Odhner
5dd74165bc Generalize focusable control finding 2023-05-05 16:46:21 -04:00
Isaiah Odhner
c8c468662d Actually prioritize the submit button for default focus 2023-05-05 16:41:42 -04:00
Isaiah Odhner
d947fa605a Exclude localization data from GitHub language statistics (and diffs...) 2023-05-05 16:31:54 -04:00
Isaiah Odhner
cdfd42e1eb Fix clicking Edit Colors window not focusing the focusable button within
Don't try to focus an unfocusable control; find the first focusable one.

The Edit Colors dialog is not yet keyboard accessible, or very fully
implemented in general, but this at least prevents a scenario where
focus is unexpectedly left in an important dialog window, such as the
"Save changes to X?" prompt, which may also be obscured by Edit Colors.
You don't want pressing Enter to interact with a different dialog than
you're expecting, and suddenly quit without saving.
2023-05-05 16:17:55 -04:00
Isaiah Odhner
5ba2ad5cd3 Fix flash of incorrect layout while windows are opening 2023-05-05 15:57:54 -04:00
Isaiah Odhner
12c494983e Revert "Remove update_styles hack, seemingly not needed anymore"
This reverts commit 42ca86f7eb.

It's needed again after the last commit...
I did override `focus`, so it's not that surprising.
But I definitely want to figure this out.
2023-05-05 13:41:48 -04:00
Isaiah Odhner
eba3043d09 Focus last control within window when clicking to bring it to the front 2023-05-05 13:32:29 -04:00
Isaiah Odhner
e2f4c24e1b Appease the type checker 2023-05-05 13:04:27 -04:00
Isaiah Odhner
5d6074c549 Remove commented out code for custom zoom integer Input
- MS Paint uses radio buttons, as I've now implemented.
- Truly custom zoom levels make much less sense in the terminal.
2023-05-05 13:04:19 -04:00
Isaiah Odhner
6effab854c Fix grammar
I stopped at this word and changed how I was wording the sentence haha
2023-05-05 12:52:34 -04:00
Isaiah Odhner
baf2b076d1 Visually reorder radio buttons, preserving numerical navigation order 2023-05-05 01:45:47 -04:00
Isaiah Odhner
c880b1c8cc Revert "Reorder radio buttons to match MS Paint"
This reverts commit 848db8180b.
2023-05-05 01:04:44 -04:00
Isaiah Odhner
6cf59cd79a Tweak requirements.txt so I can actually install from it
I'm setting up a virtual environment for the first time, and, trying
to install my dependencies, I ran into errors, 1. because of appscript
which is only intended for Mac, 2. PyGObject which IS for Linux, but
fails to install, missing "libgirepository1.0-dev", but it's optional,
it's just for wallpaper support. pyxgd is also for wallpaper support,
so maybe I should comment it out too.
And finally, [dev] is needed in order to use the `textual` command.

I don't know how well this can install on other systems, but at least
I can install it now, on Ubuntu.

Also, when the version numbers in my requirements.txt were bumped
when regenerating it, I'm guessing now that the dependencies weren't
actually upgraded, since `textual --version` gave me "0.19.1" up until
I set up my virtual environment (.venv), and now it matches the
requirements.txt version of "0.22.3". I still don't know why the version
numbers were bumped, or for sure that they weren't installed at those
versions somewhere in my filesystem. (I hope virtualenv makes things
more comprehensible, rather than more confusing...)

Also, now that I'm using textual 0.22.3, the radio button set has
arrow key navigation. Seeing this feature missing was what prompted me
to set up the virtual environment and (sort of implicitly) upgrade.
However, it doesn't work correctly, for the flipped horiz./vert. layout.
2023-05-05 00:54:52 -04:00
Isaiah Odhner
848db8180b Reorder radio buttons to match MS Paint
I asked ChatGPT to do this because I'm tired and I was curious if it
could understand. It did it straight away. I didn't even think about
aligning the code like that, it's a good idea.

> Prompt
> Reorder these such that when layed out in a left to right top to bottom grid they're in order top to bottom left to right, with 3 columns:
>
>
>                     RadioButton(_("100%"), id="value_1"),
>                     RadioButton(_("200%"), id="value_2"),
>                     RadioButton(_("400%"), id="value_4"),
>                     RadioButton(_("600%"), id="value_6"),
>                     RadioButton(_("800%"), id="value_8"),

> ChatGPT
> Here's the reordered code:
>
> bash
> Copy code
> RadioButton(_("100%"), id="value_1"), RadioButton(_("400%"), id="value_4"), RadioButton(_("800%"), id="value_8"),
> RadioButton(_("200%"), id="value_2"), RadioButton(_("600%"), id="value_6"),
2023-05-04 23:45:14 -04:00
Isaiah Odhner
ef0eb6a42b Use radio buttons in Custom Zoom window 2023-05-04 23:45:14 -04:00
Isaiah Odhner
4f08072a75 Refactor: use set_class instead of add_class/remove_class 2023-05-04 23:30:28 -04:00
Isaiah Odhner
f701d04b9d Tweak input styles in light mode 2023-05-04 22:46:08 -04:00
Isaiah Odhner
fdf44dee3a Darken window background and whiten question mark bubble
Darken the background of window content, in order to remove the ugly
yellow color filter on the question mark bubble icon.
2023-05-04 22:23:32 -04:00
Isaiah Odhner
687362a308 Add Windows 98 like logo to enlarge canvas question dialog box 2023-05-04 22:00:24 -04:00
Isaiah Odhner
903d8bd203 Make question mark bubble rounder, more oval like 2023-05-04 21:13:06 -04:00
Isaiah Odhner
0ccd9612bc Fix non-replaced background artifacts 2023-05-04 21:13:06 -04:00
Isaiah Odhner
506876893e Make question mark bubble more symmetrical and arguably rounder 2023-05-04 21:13:06 -04:00
Isaiah Odhner
75f13e95ce Remove top row of question mark icon which just had underscores 2023-05-04 21:13:06 -04:00
Isaiah Odhner
918b6d5887 Tweak question mark colors, and hide underlines 2023-05-04 21:13:06 -04:00
Isaiah Odhner
8e067ca48e Remove background from question mark icon 2023-05-04 21:13:06 -04:00
Isaiah Odhner
bf7c4df2d1 Prompt to enlarge the document when image on clipboard is larger 2023-05-04 21:13:06 -04:00
Isaiah Odhner
3544e754ea Add a stopgap to export Rich API console markup 2023-05-04 19:01:23 -04:00
Isaiah Odhner
076b4bd681 Fix AssertionError in bring_to_front 2023-05-04 19:01:23 -04:00
Isaiah Odhner
42ca86f7eb Remove update_styles hack, seemingly not needed anymore
I guess it was for windows with max/min-width/height, which I'm not doing anymore.
That or something else has changed. Yep, covering my bases here.
That, or I'm not covering my bases! You never know.
Or do you knever now?
2023-05-04 16:57:32 -04:00
Isaiah Odhner
40e9dbf88e Bring window to front when clicked 2023-05-04 16:49:13 -04:00
Isaiah Odhner
d1a27a2c9d Bring window to front if descendant gets focus 2023-05-04 16:44:27 -04:00
Isaiah Odhner
55c6bc9966 Maybe don't repaint
No significant difference has been shown between milk derived from rbST-treated and non-rbST treated cows.
2023-05-04 16:17:34 -04:00
Isaiah Odhner
ec718cac81 Make submenu positioning more reliable 2023-05-04 16:03:12 -04:00
Isaiah Odhner
9e2be988af Clean up
Don't need this reference code anymore.
2023-05-04 15:43:14 -04:00
Isaiah Odhner
f5e071f069 Fix menus cut off when viewport height is small
This fix works for the top level menus, and but it's unreliable for
submenus, just as submenus opening at all is unreliable.
2023-05-04 15:40:54 -04:00
Isaiah Odhner
bf2b471733 Implement Edit > Copy To 2023-05-04 15:26:36 -04:00
Isaiah Odhner
6e9fa34cbb Note a defect 2023-05-04 15:26:36 -04:00
Isaiah Odhner
e95407980e Implement Edit > Paste From 2023-05-04 14:57:42 -04:00
Isaiah Odhner
3e29d2a75e Split action_paste and paste 2023-05-04 14:35:14 -04:00
Isaiah Odhner
c2ee9ef2df Simplify: don't need a Task!
This still handles errors, unlike a million things I tried before,
and can still work and exit successfully.
2023-05-04 14:29:12 -04:00
Isaiah Odhner
cf39357641 Clean up 2023-05-04 14:23:32 -04:00