From 12a83efa158b1948de8a1a620f0806ff45e7f9bb Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Wed, 30 Oct 2024 13:15:39 +0000 Subject: [PATCH] Fixing ListView item cs --- src/textual/widgets/_list_item.py | 2 +- src/textual/widgets/_list_view.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/textual/widgets/_list_item.py b/src/textual/widgets/_list_item.py index a6ccf544b2..8e889d6427 100644 --- a/src/textual/widgets/_list_item.py +++ b/src/textual/widgets/_list_item.py @@ -26,7 +26,7 @@ def __init__(self, item: ListItem) -> None: self.item = item super().__init__() - async def _on_click(self, _: events.Click) -> None: + def _on_click(self, _: events.Click) -> None: self.post_message(self._ChildClicked(self)) def watch_highlighted(self, value: bool) -> None: diff --git a/src/textual/widgets/_list_view.py b/src/textual/widgets/_list_view.py index 3be74adacc..d2e240c2c6 100644 --- a/src/textual/widgets/_list_view.py +++ b/src/textual/widgets/_list_view.py @@ -27,7 +27,7 @@ class ListView(VerticalScroll, can_focus=True, can_focus_children=False): DEFAULT_CSS = """ ListView { - background: transparent; + background: $surface; &:focus-within { background-tint: $foreground 5%; } @@ -43,7 +43,7 @@ class ListView(VerticalScroll, can_focus=True, can_focus_children=False): } } - &:focus > ListItem.--highlight { + &:focus > ListItem.--highlight Widget { color: $block-cursor-foreground; background: $block-cursor-background; text-style: $block-cursor-text-style;