diff --git a/src/textual_dev/previews/borders.py b/src/textual_dev/previews/borders.py index 880b532..f4d86a4 100644 --- a/src/textual_dev/previews/borders.py +++ b/src/textual_dev/previews/borders.py @@ -68,7 +68,8 @@ def on_option_list_option_highlighted( def update_border(self, _) -> None: self.text.styles.border = ( cast( - EdgeType, self.sidebar.get_option_at_index(self.sidebar.highlighted).id + EdgeType, + self.sidebar.get_option_at_index(self.sidebar.highlighted or 0).id, ), self.theme_variables["border"], ) diff --git a/src/textual_dev/previews/easing.py b/src/textual_dev/previews/easing.py index 10ad919..e0e83b6 100644 --- a/src/textual_dev/previews/easing.py +++ b/src/textual_dev/previews/easing.py @@ -62,7 +62,6 @@ def on_load(self) -> None: self.bind( "ctrl+p", "focus('duration-input')", description="Focus: Duration Input" ) - self.bind("ctrl+b", "toggle_dark", description="Toggle Dark") def compose(self) -> ComposeResult: self.animated_bar = Bar() @@ -112,9 +111,6 @@ def on_input_changed(self, event: Input.Changed) -> None: if new_duration is not None: self.duration = new_duration - def action_toggle_dark(self) -> None: - self.dark = not self.dark - def _try_float(string: str) -> float | None: try: