Dave Pearson
f0a6771533
Update the ChangeLog and the roadmap
2023-02-23 22:14:41 +00:00
Dave Pearson
24ce819867
Add snapshot tests for the toggle button examples
2023-02-23 22:05:47 +00:00
Dave Pearson
719c831e3b
Add some unit testing for RadioSet
2023-02-23 21:50:14 +00:00
Dave Pearson
8d726fba88
Ensure the pressed button index is correct in the message
...
At the time that we're raising RadioSet.Changed, we can't be sure that the
class updates and the like have finished post RadioButton.watch_value
happening; this means that the "public" route to getting the pressed index
could be wrong (or rather, not quite up to date yet).
Meanwhile, here, we know the button involved, so we go looking for its index
directly.
2023-02-23 21:47:32 +00:00
Dave Pearson
d341b8b1b8
Fix a couple of copy/paste-o docstrings
2023-02-23 21:30:06 +00:00
Dave Pearson
236266248d
Add CSS class tests for check boxes and radio buttons
2023-02-23 21:10:21 +00:00
Dave Pearson
7c6522e634
Add initial radio button tests
2023-02-23 21:07:39 +00:00
Dave Pearson
cfe7be3abe
Some initial Checkbox unit testing
...
Lots more to come.
2023-02-23 16:46:58 +00:00
Dave Pearson
05208567ee
Prevent the initial Changed event when initial value is True
2023-02-23 16:45:35 +00:00
Dave Pearson
837d56f47f
Provide a default label for the toggle buttons
...
If one isn't provided it'll be an empty string.
2023-02-23 16:09:24 +00:00
Dave Pearson
307b1789a1
Give radio button its own example code now
...
Still within a RadioSet, but this time only the code that uses RadioSet; not
the code that just uses strings.
2023-02-23 16:00:14 +00:00
Dave Pearson
316faf9e45
Add width reference documentation for radio set
2023-02-23 15:31:32 +00:00
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