mirror of
https://github.com/Textualize/rich.git
synced 2025-08-16 08:20:27 +00:00
ref(tree): minor changes
This commit is contained in:
parent
a04644e59f
commit
b098f55af6
1 changed files with 2 additions and 2 deletions
|
@ -127,7 +127,7 @@ class Tree(JupyterMixin):
|
||||||
|
|
||||||
guide_style = guide_style_stack.current + get_style(node.guide_style)
|
guide_style = guide_style_stack.current + get_style(node.guide_style)
|
||||||
style = style_stack.current + get_style(node.style)
|
style = style_stack.current + get_style(node.style)
|
||||||
prefix = levels[(1 if self.hide_root == False else 2) :]
|
prefix = levels[(2 if self.hide_root else 2) :]
|
||||||
renderable_lines = console.render_lines(
|
renderable_lines = console.render_lines(
|
||||||
Styled(node.label, style),
|
Styled(node.label, style),
|
||||||
options.update(
|
options.update(
|
||||||
|
@ -138,7 +138,7 @@ class Tree(JupyterMixin):
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
if not (depth == 0 and self.hide_root == True):
|
if not (depth == 0 and self.hide_root):
|
||||||
for first, line in loop_first(renderable_lines):
|
for first, line in loop_first(renderable_lines):
|
||||||
if prefix:
|
if prefix:
|
||||||
yield from _Segment.apply_style(
|
yield from _Segment.apply_style(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue