From e3b3157540cdf1379b82f4a93d30831ec37523a0 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Tue, 21 Feb 2023 22:02:01 +0000 Subject: [PATCH] Swap the 5x5 game header to the alt-compose method Embrace the future! --- examples/five_by_five.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/five_by_five.py b/examples/five_by_five.py index 96ce95ac3..c89bea49e 100644 --- a/examples/five_by_five.py +++ b/examples/five_by_five.py @@ -87,11 +87,10 @@ class GameHeader(Widget): Returns: ComposeResult: The result of composing the game header. """ - yield Horizontal( - Label(self.app.title, id="app-title"), - Label(id="moves"), - Label(id="progress"), - ) + with Horizontal(): + yield Label(self.app.title, id="app-title") + yield Label(id="moves") + yield Label(id="progress") def watch_moves(self, moves: int): """Watch the moves reactive and update when it changes.