This commit is contained in:
Will McGugan
2022-12-20 14:06:35 +00:00
parent 59057eef83
commit 1cef349f27
4 changed files with 263 additions and 259 deletions

View File

@@ -368,6 +368,7 @@ class App(Generic[ReturnType], DOMNode):
self._screenshot: str | None = None
self._dom_lock = asyncio.Lock()
self._dom_ready = False
self.set_class(self.dark, "-dark-mode")
@property
def return_value(self) -> ReturnType | None:

View File

@@ -91,13 +91,14 @@ class Header(Widget):
Header {
dock: top;
width: 100%;
background: $secondary-background;
background: $foreground 5%;
color: $text;
height: 1;
}
Header.-tall {
height: 3;
}
"""
tall = Reactive(False)

File diff suppressed because one or more lines are too long

View File

@@ -12,7 +12,9 @@ async def test_run_test() -> None:
app = TestApp()
async with app.run_test() as pilot:
assert str(pilot) == "<Pilot app=TestApp(title='TestApp')>"
assert (
str(pilot) == "<Pilot app=TestApp(title='TestApp', classes={'-dark-mode'})>"
)
await pilot.press("tab", *"foo")
await pilot.pause(1 / 100)
await pilot.exit("bar")