Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions tame/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@

class TAMEApp(App):
CSS = """
Screen {
background: #1e1e1e;
color: #d4d4d4;
}

#main-content {
height: 1fr;
width: 1fr;
Expand Down Expand Up @@ -621,6 +616,9 @@ def action_toggle_theme(self) -> None:
css_path = self._theme_manager.get_css_path()
if css_path:
self.stylesheet.source.clear()
# Re-add the app's structural layout CSS first
self.stylesheet.add_source(self.CSS, read_from=("TAMEApp", ""))
# Then add the new theme CSS (Screen colors, widget colors)
self.stylesheet.add_source(
css_path.read_text(), read_from=(str(css_path), "")
)
Expand Down