Merge branch 'main' into directory-tree-work-in-worker

This commit is contained in:
Dave Pearson
2023-05-11 15:32:17 +01:00
3 changed files with 6 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Fixed `TreeNode.expand` and `TreeNode.expand_all` not posting a `Tree.NodeExpanded` message https://github.com/Textualize/textual/issues/2535
- Fixed `TreeNode.collapse` and `TreeNode.collapse_all` not posting a `Tree.NodeCollapsed` message https://github.com/Textualize/textual/issues/2535
- Fixed `TreeNode.toggle` and `TreeNode.toggle_all` not posting a `Tree.NodeExpanded` or `Tree.NodeCollapsed` message https://github.com/Textualize/textual/issues/2535
- `footer--description` component class was being ignored https://github.com/Textualize/textual/issues/2544
## [0.24.1] - 2023-05-08

View File

@@ -839,7 +839,7 @@ class Region(NamedTuple):
@lru_cache(maxsize=1024)
def split_horizontal(self, cut: int) -> tuple[Region, Region]:
"""Split a region in to two, from a given x offset.
"""Split a region in to two, from a given y offset.
```
┌─────────┐
@@ -852,8 +852,8 @@ class Region(NamedTuple):
```
Args:
cut: An offset from self.x where the cut should be made. May be negative,
for the offset to start from the right edge.
cut: An offset from self.y where the cut should be made. May be negative,
for the offset to start from the bottom edge.
Returns:
Two regions, which add up to the original (self).

View File

@@ -98,6 +98,7 @@ class Footer(Widget):
highlight_style = self.get_component_rich_style("footer--highlight")
highlight_key_style = self.get_component_rich_style("footer--highlight-key")
key_style = self.get_component_rich_style("footer--key")
description_style = self.get_component_rich_style("footer--description")
bindings = [
binding
@@ -122,7 +123,7 @@ class Footer(Widget):
(f" {key_display} ", highlight_key_style if hovered else key_style),
(
f" {binding.description} ",
highlight_style if hovered else base_style,
highlight_style if hovered else base_style + description_style,
),
meta={
"@click": f"app.check_bindings('{binding.key}')",