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"),
This commit is contained in:
Isaiah Odhner 2023-05-04 23:41:52 -04:00
parent ef0eb6a42b
commit 848db8180b

View File

@ -2380,11 +2380,8 @@ class PaintApp(App[None]):
# Input(id="zoom_input", value=str(self.magnification)),
# # ),
RadioSet(
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"),
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"),
)
),
Container(