From 6d6c8c9fce4fef0a7a3593350c36d84a2a533db4 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Thu, 24 Mar 2022 14:56:12 +0000 Subject: [PATCH] comments --- sandbox/uber.css | 17 ----------------- sandbox/uber.py | 18 +++--------------- src/textual/_border.py | 2 ++ 3 files changed, 5 insertions(+), 32 deletions(-) diff --git a/sandbox/uber.css b/sandbox/uber.css index bb848e433..5ac412667 100644 --- a/sandbox/uber.css +++ b/sandbox/uber.css @@ -1,5 +1,4 @@ #uber1 { - /* border: heavy green;*/ layout: vertical; text: on dark_green; overflow: hidden auto; @@ -8,22 +7,6 @@ .list-item { height: 8; - min-width: 80; - - /* height: 8; */ - /* margin: 1 2; */ text-background: dark_blue; } - -#child1 { -} - -#child2 { -} - -/* #uber2 { - margin: 3; - layout: dock; - docks: _default=left; -} */ diff --git a/sandbox/uber.py b/sandbox/uber.py index 240cdf14e..b8456792d 100644 --- a/sandbox/uber.py +++ b/sandbox/uber.py @@ -20,27 +20,15 @@ class BasicApp(App): Widget(id="uber2-child1"), Widget(id="uber2-child2"), ) - uber1 = Widget( Placeholder(id="child1", classes={"list-item"}), Placeholder(id="child2", classes={"list-item"}), Placeholder(id="child3", classes={"list-item"}), Placeholder(classes={"list-item"}), - # Placeholder(classes={"list-item"}), - # Placeholder(classes={"list-item"}), - # Placeholder(classes={"list-item"}), - # Placeholder(classes={"list-item"}), - # Placeholder(classes={"list-item"}), - # Placeholder(classes={"list-item"}), - # Placeholder(classes={"list-item"}), - # Placeholder(id="child3", classes={"list-item"}), - ) - uber1.show_horizontal_scrollbar = True - - self.mount( - uber1=uber1 - # uber2=uber2, + Placeholder(classes={"list-item"}), + Placeholder(classes={"list-item"}), ) + self.mount(uber1=uber1) async def on_key(self, event: events.Key) -> None: await self.dispatch_key(event) diff --git a/src/textual/_border.py b/src/textual/_border.py index b6b8192a8..b2bb3a0ff 100644 --- a/src/textual/_border.py +++ b/src/textual/_border.py @@ -28,6 +28,8 @@ BORDER_CHARS: dict[str, tuple[str, str, str]] = { "wide": ("▁▁▁", "▏ ▕", "▔▔▔"), } +# Some of the borders are on the widget background and some are on the background of the parent +# This table selects which for each character, 0 indicates the widget, 1 selects the parent BORDER_LOCATIONS: dict[ str, tuple[tuple[int, int, int], tuple[int, int, int], tuple[int, int, int]] ] = {