Commit graph

15 commits

Author SHA1 Message Date
Dave Pearson
f092e9f46c
Reorder some imports 2023-02-09 13:50:38 +00:00
Dave Pearson
decc1e2f3c
Rename Checkbox to Switch
A new form of Checkbox will be arriving in Textual soon, working in
conjunction with a RadioButton. What was called Checkbox is perhaps a wee
bit heavyweight in terms of visual design, but is a style of widget that
should remain.

With this in mind we're renaming the current Checkbox to Switch. In all
other respects its workings remains the same, only the name has changed.

Things for people to watch out for:

- Imports will need to be updated.
- Queries will need to be updated; special attention will need to be paid to
  any queries that are string-based.
- CSS will need to be changed if any Checkbox styling is happening, or if
  any Checkbox component styles are being used.

See #1725 as the initial motivation and #1746 as the issue for this
particular change.
2023-02-09 11:10:30 +00:00
Rodrigo Girão Serrão
4963f62893 Use focusable widgets in tests. 2023-01-17 15:02:09 +00:00
Rodrigo Girão Serrão
ed1f7331d8 Add focus tests. 2023-01-17 14:56:45 +00:00
Rodrigo Girão Serrão
12f272d507 Fix tests.
I misread the original app hierarchy and was trying to focus something that can't be focused.
2023-01-17 14:56:35 +00:00
Rodrigo Girão Serrão
56f339db20 Add failing tests. 2023-01-17 12:26:03 +00:00
Dave Pearson
06ab4f4d70
Run black over child focus tests 2023-01-09 13:56:35 +00:00
darrenburns
65008082ca
Support focusable containers (#1130)
* Fix containers not being focusable

* Fix tests to allow for focusable containers

* Add test for non-focusable container with focusable children

* Fix a typo in a test
2022-11-07 16:36:53 +00:00
darrenburns
36ac94734f
Move focus logic to screen, add more key replacements, collapse bindings in footer (#880)
* Move focusing logic to the Screen level

* Update tests to support per-screen focus management

* Some additional key name replacements

* Improve rendering of bindings in footer when multiple items have same action

* Clean up footer, allow key_displays csv

* Prevent exception when widget is not in screen
2022-10-13 10:43:16 +01:00
Will McGugan
b22436933a lots of docstrings 2022-08-25 09:08:35 +01:00
Will McGugan
efe0342a6f docstring 2022-08-16 20:39:43 +01:00
Olivier Philippon
cdad0ff020 [App] Remove the focus timer: we now focus from a widget to the next/prev one instantly 2022-05-12 16:52:16 +01:00
Will McGugan
e382fc14b1 add new can_focus_children attribute 2022-05-05 10:36:59 +01:00
Will McGugan
4337da8019 docstrings 2022-05-04 11:02:33 +01:00
Will McGugan
a2da5546bd focus traversal 2022-05-04 10:54:20 +01:00