From 101f199b33155c810de649cb52eb776b6c525c5c Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Sat, 16 Nov 2024 00:12:07 +0000 Subject: [PATCH] Registering builtin themes on startup --- src/textual/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/textual/app.py b/src/textual/app.py index 39ccaeccf9..55225474b2 100644 --- a/src/textual/app.py +++ b/src/textual/app.py @@ -530,6 +530,9 @@ def __init__( This excludes the built-in themes.""" + for theme in BUILTIN_THEMES.values(): + self.register_theme(theme) + ansi_theme = ( self.ansi_theme_dark if self.current_theme.dark else self.ansi_theme_light ) @@ -1228,7 +1231,7 @@ def available_themes(self) -> dict[str, Theme]: A dictionary mapping theme names to Theme instances. """ - return {**BUILTIN_THEMES, **self._registered_themes} + return {**self._registered_themes} @property def current_theme(self) -> Theme: