Commit Graph

5321 Commits

Author SHA1 Message Date
Dave Pearson
a821b2f8f6 Add width reference documentation for radio buttons
A large part of the code to go with this is to show off a radio set; I feel
it makes sense to use the same code for both bits of documentation given
that a radio button only really makes sense inside a radio set.
2023-02-23 15:14:25 +00:00
Dave Pearson
a3d50d90f6 Revert example code to composing the old way
We've not documented it yet so, until we do...
2023-02-23 15:09:45 +00:00
Dave Pearson
87bd610eec Swap the checkbox example to the newer compose approach 2023-02-23 14:45:24 +00:00
Dave Pearson
01215a1fe8 Tweak the style of the box in the example for checkbox 2023-02-23 14:40:58 +00:00
Dave Pearson
4f75a395d8 Fix copy/paste-o in the checkbox reference 2023-02-23 14:35:24 +00:00
Dave Pearson
3fd3d272ce Add the widget reference for Checkbox 2023-02-23 14:26:11 +00:00
Dave Pearson
66af586d0e Add a missing 2023-02-23 13:52:22 +00:00
Dave Pearson
6233ae3377 Extend and improve the RadioSet docstrings 2023-02-23 13:39:48 +00:00
Dave Pearson
652d449643 Type-tidy the radio set button query 2023-02-23 13:34:08 +00:00
Dave Pearson
affb3b696f Type-tidy the radio set event handling 2023-02-23 13:32:17 +00:00
Dave Pearson
f52aac4952 Initial work on adding toggle buttons to the documentation
This just gets the API docs into place, and tidies up some of the docstirngs.
2023-02-23 13:27:27 +00:00
Dave Pearson
99341a9cd4 Rename the file that holds ToggleButton
This makes it more in keeping with other widgets, despite the fact that it
should be considered to be an internal widget.
2023-02-23 12:29:50 +00:00
Dave Pearson
1c05f79f3c Add some default styling to a radio set 2023-02-23 10:54:28 +00:00
Dave Pearson
af3c5f15c6 Ensure that toggle buttons are width auto 2023-02-23 10:54:09 +00:00
Dave Pearson
ceade8a242 Ensure we're only working with the first line of the label 2023-02-23 10:17:18 +00:00
Dave Pearson
73cb4c5ec2 Turn off wrapping and add ellipsis to the overall widget 2023-02-23 10:13:08 +00:00
Dave Pearson
46018c3d40 Add missing import 2023-02-23 10:11:57 +00:00
Dave Pearson
2fbb64c27f Add methods for getting the width and height of the widget 2023-02-23 10:09:03 +00:00
Dave Pearson
a32a9fa6af Reduce the calls to Text when building the button
Found out that Text.assemble can take a collection of tuple of text and
style, which makes things a lot easier and needs less object construction.
2023-02-23 10:06:13 +00:00
Dave Pearson
177aae6902 Don't force a radio set to have at least one button on on start
It felt like the right thing to do, but it shouldn't be necessary. There are
times where someone may actually want to have a radio set with no buttons
pushed to start with.
2023-02-22 21:07:08 +00:00
Dave Pearson
789e0511d2 Don't react on initial set 2023-02-22 21:06:47 +00:00
Dave Pearson
1b2f5a15a3 Stop wrapping the spacer as Text
It's not needed. It has no style of its own. It's just a space.
2023-02-22 21:01:03 +00:00
Dave Pearson
91199fd6e9 Make the label available but read-only
This was originally going to be something that could be modified on the fly,
but it's been requested that this not be the case. So here I'm making the
actual label an internal and providing read-only access to it.
2023-02-22 20:55:20 +00:00
Dave Pearson
9dd66fcdcb Tidy some documentation in the base toggle box class 2023-02-22 20:45:34 +00:00
Dave Pearson
18705b4d4e Merge branch 'main' into toggle-boxen 2023-02-22 16:04:01 +00:00
Will McGugan
d410a7c2fa Merge pull request #1854 from Textualize/css-fix-virtual-class
WIP Css fix virtual class
2023-02-22 16:01:48 +00:00
Dave Pearson
9f9fe6fe7c Docstring tidy 2023-02-22 15:46:57 +00:00
Dave Pearson
967773f21e More tidying of the button styles 2023-02-22 15:44:09 +00:00
Dave Pearson
0358d7448f Tweak the buttons in light mode 2023-02-22 15:32:42 +00:00
Dave Pearson
8bcee3f3ed More style changing to the toggle buttons
This feels like it's close to the final styles.
2023-02-22 15:12:19 +00:00
Will McGugan
5686147909 comment 2023-02-22 14:33:23 +00:00
Will McGugan
3c9e89d778 snapshots 2023-02-22 14:21:25 +00:00
Will McGugan
c63cab728b force pause 2023-02-22 14:08:54 +00:00
Will McGugan
5facb0a8a3 fix component refresh 2023-02-22 13:54:32 +00:00
Will McGugan
c2a2582c26 fixed oreder 2023-02-22 13:50:58 +00:00
Will McGugan
edd1c28b79 restore css bases 2023-02-22 13:41:05 +00:00
Will McGugan
801051b70b garantee order 2023-02-22 13:32:49 +00:00
Dave Pearson
7ee970e79d Support richer labels 2023-02-22 13:32:10 +00:00
Dave Pearson
23cc1daca1 Bring the button_first setting internal
This was a reactive, the idea being that folk could swap the layout of a
button the fly, but the request has been made that we don't go quite so OTT
with the ability to configure.
2023-02-22 13:30:44 +00:00
Dave Pearson
5743148ce8 Fix -light-mode not being set on startup if not in dark mode 2023-02-22 13:28:45 +00:00
Will McGugan
dae686a693 Test without cache 2023-02-22 13:14:00 +00:00
Dave Pearson
8506f79d1f Simplify the setting of the button characters 2023-02-22 13:11:43 +00:00
Dave Pearson
724fef7ae4 Sort the list of component classes in the docstring 2023-02-22 13:11:21 +00:00
Dave Pearson
5c89efc6fd Simplify the setting and handling of the label
Stopping doing this as a reactive; although I might do it as a setter. Still
want to decide.
2023-02-22 13:07:46 +00:00
Dave Pearson
ada24c9d6f Simplify the setting of the button characters 2023-02-22 13:00:20 +00:00
Dave Pearson
277412b92e Simplify the styling of the button 2023-02-22 12:58:40 +00:00
Dave Pearson
f8f3691239 Add required import 2023-02-22 12:58:14 +00:00
Will McGugan
408342bc0b snapshots 2023-02-22 11:46:50 +00:00
Dave Pearson
cbd0cfded9 Merge branch 'main' into toggle-boxen 2023-02-22 10:30:50 +00:00
Will McGugan
8152b2af2d snapshot 2023-02-22 09:59:29 +00:00