mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 18:18:22 +00:00
Updates example/layout.py to use Splitter class
This commit is contained in:
parent
57736f4655
commit
f24b668793
2 changed files with 1 additions and 4 deletions
|
@ -23,9 +23,7 @@ layout.split(
|
|||
Layout(size=10, name="footer"),
|
||||
)
|
||||
|
||||
layout["main"].split(
|
||||
Layout(name="side"), Layout(name="body", ratio=2), direction="horizontal"
|
||||
)
|
||||
layout["main"].split_row(Layout(name="side"), Layout(name="body", ratio=2))
|
||||
|
||||
layout["side"].split(Layout(), Layout())
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ class LayoutRender(NamedTuple):
|
|||
|
||||
RegionMap = Dict["Layout", Region]
|
||||
RenderMap = Dict["Layout", LayoutRender]
|
||||
Direction = Literal["horizontal", "vertical"]
|
||||
|
||||
|
||||
class LayoutError(Exception):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue