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.
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"),
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?
I'm not sure whether it should continue the color at the end of a row,
or if it should use the default color, but before, it used the last
color set in the entire file, even for earlier rows,
so this is at least better than that.
I used:
cd samples && sed -i 's/$/\r/' *
A git diff across branches suggests that this command gives the same results:
src/textual_paint/paint.py --recode-samples
And --recode-samples is now idempotent, for the current set of sample files.
This is dependent on the font.
In both Chrome/Firefox, monospace uses "DejaVu Sans Mono" on my system,
but if I specify "DejaVu Sans Mono" explicitly, it uses a larger
font size (16px, as compared to 12px in Firefox or 13px in Chrome), and
slight gaps are visible.
This fixes a regression when switching over to the Rich API's built-in
HTML exporting — from where I'm sitting — but it may look totally
different on someone else's computer.