From e1ace06b12863f90d3837a3c4e00cd6e33facde4 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Fri, 22 May 2026 19:13:41 +0100 Subject: [PATCH] :bug: Don't ever use ANSI themes --- ChangeLog.md | 8 ++++++++ src/textual_enhanced/app.py | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index 8183853..da6dd0e 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,13 @@ # textual-enhanced ChangeLog +## Unreleased + +**Released: WiP** + +- Removed all ANSI themes from the available themes. Not only do they not + look great, they can cause a crash in some applications. + ([#74](https://github.com/davep/textual-enhanced/pull/74)) + ## v1.4.0 **Released: 20206-04-03** diff --git a/src/textual_enhanced/app.py b/src/textual_enhanced/app.py index e19371c..b052455 100644 --- a/src/textual_enhanced/app.py +++ b/src/textual_enhanced/app.py @@ -8,6 +8,7 @@ # Textual imports. from textual.app import App, ReturnType from textual.binding import Binding +from textual.theme import Theme ############################################################################## @@ -72,5 +73,14 @@ class EnhancedApp(Generic[ReturnType], App[ReturnType]): ), ] + @property + def available_themes(self) -> dict[str, Theme]: + """All available non-ANSI themes.""" + return { + name: theme + for name, theme in super().available_themes.items() + if not name.startswith("ansi") + } + ### app.py ends here