mirror of https://github.com/Textualize/rich.git
Merge pull request #1142 from apoclyps/layout-example-using-splitter
Updates example/layout.py to use Splitter class
This commit is contained in:
commit
0758f2eff0
|
@ -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…
Reference in New Issue