Skip to content

Commit dd2b89b

Browse files
authored
Merge pull request #1413 from Textualize/not-ugly
Not ugly
2 parents 59057ee + 9fda476 commit dd2b89b

File tree

5 files changed

+264
-265
lines changed

5 files changed

+264
-265
lines changed

src/textual/app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ def __init__(
368368
self._screenshot: str | None = None
369369
self._dom_lock = asyncio.Lock()
370370
self._dom_ready = False
371+
self.set_class(self.dark, "-dark-mode")
371372

372373
@property
373374
def return_value(self) -> ReturnType | None:

src/textual/widget.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2179,11 +2179,7 @@ def refresh(
21792179
for ancestor in self.ancestors:
21802180
if not isinstance(ancestor, Widget):
21812181
break
2182-
if ancestor.styles.auto_dimensions:
2183-
for ancestor in self.ancestors_with_self:
2184-
if isinstance(ancestor, Widget):
2185-
ancestor._clear_arrangement_cache()
2186-
break
2182+
ancestor._clear_arrangement_cache()
21872183

21882184
if repaint:
21892185
self._set_dirty(*regions)

src/textual/widgets/_header.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ class Header(Widget):
9191
Header {
9292
dock: top;
9393
width: 100%;
94-
background: $secondary-background;
94+
background: $foreground 5%;
9595
color: $text;
9696
height: 1;
9797
}
9898
Header.-tall {
9999
height: 3;
100-
}
100+
}
101101
"""
102102

103103
tall = Reactive(False)

tests/snapshot_tests/__snapshots__/test_snapshots.ambr

Lines changed: 257 additions & 257 deletions
Large diffs are not rendered by default.

tests/test_test_runner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ def on_key(self, event: events.Key) -> None:
1212

1313
app = TestApp()
1414
async with app.run_test() as pilot:
15-
assert str(pilot) == "<Pilot app=TestApp(title='TestApp')>"
15+
assert (
16+
str(pilot) == "<Pilot app=TestApp(title='TestApp', classes={'-dark-mode'})>"
17+
)
1618
await pilot.press("tab", *"foo")
1719
await pilot.pause(1 / 100)
1820
await pilot.exit("bar")

0 commit comments

Comments
 (0)