From f24b668793b318dee1bff376cb57d00ef8c53412 Mon Sep 17 00:00:00 2001 From: apoclyps Date: Mon, 29 Mar 2021 22:13:25 +0100 Subject: [PATCH] Updates example/layout.py to use Splitter class --- examples/layout.py | 4 +--- rich/layout.py | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/layout.py b/examples/layout.py index a2ced2e2..1e94dac0 100644 --- a/examples/layout.py +++ b/examples/layout.py @@ -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()) diff --git a/rich/layout.py b/rich/layout.py index 7079137a..c8aab23b 100644 --- a/rich/layout.py +++ b/rich/layout.py @@ -40,7 +40,6 @@ class LayoutRender(NamedTuple): RegionMap = Dict["Layout", Region] RenderMap = Dict["Layout", LayoutRender] -Direction = Literal["horizontal", "vertical"] class LayoutError(Exception):