From 2a3c71cd5830b227834045ba1cf1c88f651b4396 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Tue, 11 Jun 2024 13:32:51 +0100 Subject: [PATCH] Expand the click target area for the tree --- src/textual/widgets/_tree.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/textual/widgets/_tree.py b/src/textual/widgets/_tree.py index 686382433d..dbb0c64a4d 100644 --- a/src/textual/widgets/_tree.py +++ b/src/textual/widgets/_tree.py @@ -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 @@ -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))