Merge pull request #1142 from apoclyps/layout-example-using-splitter

Updates example/layout.py to use Splitter class
This commit is contained in:
Will McGugan 2021-03-30 09:20:39 +01:00 committed by GitHub
commit 0758f2eff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View File

@ -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())

View File

@ -40,7 +40,6 @@ class LayoutRender(NamedTuple):
RegionMap = Dict["Layout", Region]
RenderMap = Dict["Layout", LayoutRender]
Direction = Literal["horizontal", "vertical"]
class LayoutError(Exception):