Commit Graph

1349 Commits

Author SHA1 Message Date
Isaiah Odhner
7eff7d0476 Add meta-glyph rendering for corner triangle characters 2023-07-19 22:57:04 -04:00
Isaiah Odhner
3269d545c1 Note more alternatives 2023-07-19 22:30:49 -04:00
Isaiah Odhner
8b79dd98a9 Tweak grid style to be more like MS Paint
Avoid the cell background showing past the left/top of the border of the cell, by using left/top-aligned characters (▛▌▀) rather than centered border characters (┼┆┄).
2023-07-19 22:28:19 -04:00
Isaiah Odhner
507470ad10 Make grid more subtle by showing cell background underneath border 2023-07-19 22:15:15 -04:00
Isaiah Odhner
6a9e8703a6 Improve grid style 2023-07-19 21:59:47 -04:00
Isaiah Odhner
bf7fdac01d Implement View > Zoom > Show Grid 2023-07-19 21:53:10 -04:00
Isaiah Odhner
52a9425b36 Try to allow canceling Set As Wallpaper (probably silly) 2023-07-19 20:45:25 -04:00
Isaiah Odhner
f865acd56c Fix error handling for Set As Wallpaper worker thread 2023-07-19 13:58:31 -04:00
Isaiah Odhner
8e7113e1b5 Match font names case-insensitively and ignoring spaces 2023-07-19 01:44:20 -04:00
Isaiah Odhner
ec7986f9dd Add font names for Windows 2023-07-19 01:31:57 -04:00
Isaiah Odhner
b63f303cf4 Set wallpaper in a worker, to keep UI responsive 2023-07-19 01:26:33 -04:00
Isaiah Odhner
1c64fdb78c Fix Python rocket icon showing in dock on macOS after Set As Wallpaper 2023-07-18 18:32:32 -04:00
Isaiah Odhner
5c7272db91 Clean up Tk root widget
I was hoping this would fix the Python rocket icon showing in the dock on macOS, but it doesn't. It still stays until the program exits.
Might still be good to do though.
2023-07-18 18:32:32 -04:00
Isaiah Odhner
e2308c2a91 Add font names for macOS 2023-07-18 14:15:36 -04:00
Isaiah Odhner
5a5d8b38af Colorize Text Tilt art 2023-07-18 14:15:36 -04:00
Isaiah Odhner
10ed661022 Use unique IDs to actually reliably update wallpaper 2023-07-18 14:15:36 -04:00
Isaiah Odhner
3106a311eb Alternate between files to reliably update wallpaper 2023-07-18 14:15:36 -04:00
Isaiah Odhner
eb0f781ca8 Get screen size with tkinter instead
screeninfo caused a bouncing python rocket in the dock on mac, and didn't work.
2023-07-18 14:15:36 -04:00
Isaiah Odhner
7f3fe53d3e Get screen size properly, with screeninfo module 2023-07-18 14:03:51 -04:00
Isaiah Odhner
fd7f3e8fcc Get screen size in the simplest way that could possibly work 2023-07-18 14:03:51 -04:00
Isaiah Odhner
8fb561f457 Implement tiling vs centering wallpaper 2023-07-18 14:03:51 -04:00
Isaiah Odhner
00e6dd70b0 Set dark mode wallpaper as well on Ubuntu
This gets it working on my machine! And the last of the big three!
2023-07-18 14:03:51 -04:00
Isaiah Odhner
5fd214182c DRY gsettings schema/key 2023-07-18 14:03:51 -04:00
Isaiah Odhner
fece1c48c6 Rasterize before setting as wallpaper
This makes Set As Wallpaper work on Windows 10 and macOS 10.14
2023-07-18 14:03:51 -04:00
Isaiah Odhner
ebbab737d4 Add compatibility section 2023-07-17 20:27:19 -04:00
Isaiah Odhner
2966ebf6da Be consistent about encoding name 2023-07-17 20:04:25 -04:00
Isaiah Odhner
fc395e2db9 Specify UTF-8 encoding, since it's not default on Windows
https://peps.python.org/pep-0597/#using-the-default-encoding-is-a-common-mistake
2023-07-17 20:04:24 -04:00
Isaiah Odhner
033e86f4e7 Make psutil optional
It's hard to install on Windows, and this seems to be misleading:

    ERROR: Could not build wheels for psutil, which is required to install pyproject.toml-based projects
2023-07-17 19:18:31 -04:00
Isaiah Odhner
300291fcae Indicate non-regex raw string (conventionally)
Some tools highlight regex syntax when a lowercase `r` is used.
2023-07-17 13:49:41 -04:00
Isaiah Odhner
82dd98d8cb Fix invalid assertion on mac
os.name == "posix" (!)
2023-07-17 12:31:48 -04:00
Isaiah Odhner
321dd1284f Move "type: ignore" comment now serving a different purpose
Before this was presumably suppressing the `self.app` bogus error.
2023-07-17 12:25:33 -04:00
Isaiah Odhner
a0f837aad7 Remove unnecessary "type: ignore" comments 2023-07-16 01:06:24 -04:00
Isaiah Odhner
36e809bc97 Enable reporting unnecessary "type: ignore" comments 2023-07-16 00:47:15 -04:00
Isaiah Odhner
15b35eaf5c Fix new errors after updating pyright (v1.1.314 -> v1.1.317)
→ PYRIGHT_PYTHON_FORCE_VERSION=latest pyright

added 1 package, and audited 2 packages in 4s

found 0 vulnerabilities
/home/io/Projects/textual-paint/src/textual_paint/paint.py
  /home/io/Projects/textual-paint/src/textual_paint/paint.py:1173:64 - error: Condition will always evaluate to True since the types "Never" and "None" have no overlap (reportUnnecessaryComparison)
  /home/io/Projects/textual-paint/src/textual_paint/paint.py:1214:26 - error: Pattern will never be matched for subject type "Never" (reportUnnecessaryComparison)
  /home/io/Projects/textual-paint/src/textual_paint/paint.py:1217:26 - error: Pattern will never be matched for subject type "Never" (reportUnnecessaryComparison)
  /home/io/Projects/textual-paint/src/textual_paint/paint.py:1220:26 - error: Pattern will never be matched for subject type "Never" (reportUnnecessaryComparison)
  /home/io/Projects/textual-paint/src/textual_paint/paint.py:1223:26 - error: Pattern will never be matched for subject type "Never" (reportUnnecessaryComparison)
  /home/io/Projects/textual-paint/src/textual_paint/paint.py:1229:26 - error: Pattern will never be matched for subject type "Never" (reportUnnecessaryComparison)
  /home/io/Projects/textual-paint/src/textual_paint/paint.py:1233:26 - error: Pattern will never be matched for subject type "Never" (reportUnnecessaryComparison)
7 errors, 0 warnings, 0 informations
2023-07-15 23:32:18 -04:00
Isaiah Odhner
f21899fd1d Use LineFilter to avoid private _segments access
This fixes the last pyright error (on pyright v1.1.314)
2023-07-15 23:24:56 -04:00
Isaiah Odhner
f6a40028e8 Update and clarify help text 2023-07-15 23:05:41 -04:00
Isaiah Odhner
b62a92a782 Simplify using Segment.apply_style 2023-07-15 22:45:52 -04:00
Isaiah Odhner
96b2d08789 Ignore all but one last Pyright error
(on pyright v1.1.314)
2023-07-15 22:27:49 -04:00
Isaiah Odhner
26cf8c3e64 Annotate instruction from stransi 2023-07-15 22:26:41 -04:00
Isaiah Odhner
9c8c035d14 Add type stubs for Pillow and psutil 2023-07-15 21:53:09 -04:00
Isaiah Odhner
d5669f434f Fix type mismatch in unused code
error: Incompatible types in assignment (expression has type "None", variable has type "bool")  [assignment]
2023-07-15 21:52:47 -04:00
Isaiah Odhner
0a6fb29e10 Reorder None case for mypy
While Pyright can narrow down the type of format_id from `str | None` to `str` based on `format_id in Image.SAVE` (where `Image.SAVE` is `dict[str, Any]`), mypy does not.
2023-07-15 21:47:43 -04:00
Isaiah Odhner
641a46e368 Add type hints for mypy 2023-07-15 21:43:50 -04:00
Isaiah Odhner
3ff0b47650 Fix strange default for Window.title reactive var 2023-07-15 21:29:59 -04:00
Isaiah Odhner
eb81d5e934 Add missing annotations, needed for mypy 2023-07-15 21:22:25 -04:00
Isaiah Odhner
1c737fada2 Avoid shell=True and fix mypy errors about mismatching type for args 2023-07-15 21:09:08 -04:00
Isaiah Odhner
1ce0487a52 Fix reportOptionalMemberAccess errors for width/height 2023-07-15 21:09:08 -04:00
Isaiah Odhner
6c1b994598 Smooth over variable getpixel return type, for Pyright 2023-07-15 20:31:02 -04:00
Isaiah Odhner
87f1f50f06 Fix some stupid pyright errors 2023-07-15 20:27:20 -04:00
Isaiah Odhner
6f5cee0f7c Disable reportUnknownMemberType Pyright error 2023-07-15 20:27:20 -04:00