Skip to content

Commit

Permalink
Expand the click target area for the tree
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Jun 11, 2024
1 parent 099b616 commit 2a3c71c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/textual/widgets/_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,8 @@ def get_guides(style: Style) -> tuple[str, str, str, str]:
else:
line_style = base_style

line_style += Style(meta={"line": y})

guides = Text(style=line_style)
guides_append = guides.append

Expand Down Expand Up @@ -1124,7 +1126,7 @@ def get_guides(style: Style) -> tuple[str, str, str, str]:
)

label = self.render_label(line.path[-1], line_style, label_style).copy()
label.stylize(Style(meta={"node": line.node._id, "line": y}))
label.stylize(Style(meta={"node": line.node._id}))
guides.append(label)

segments = list(guides.render(self.app.console))
Expand Down

0 comments on commit 2a3c71c

Please sign in to comment.