Skip to content

Commit

Permalink
Merge pull request #1142 from apoclyps/layout-example-using-splitter
Browse files Browse the repository at this point in the history
Updates example/layout.py to use Splitter class
  • Loading branch information
willmcgugan authored Mar 30, 2021
2 parents 57736f4 + f24b668 commit 0758f2e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions examples/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
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())

Expand Down
1 change: 0 additions & 1 deletion rich/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class LayoutRender(NamedTuple):

RegionMap = Dict["Layout", Region]
RenderMap = Dict["Layout", LayoutRender]
Direction = Literal["horizontal", "vertical"]


class LayoutError(Exception):
Expand Down

0 comments on commit 0758f2e

Please sign in to comment.