Skip to content

Commit

Permalink
🔀 Merge pull request #130 from davep/simplify-main-compose
Browse files Browse the repository at this point in the history
Simplify the compose of the main screen
  • Loading branch information
davep authored Jan 29, 2025
2 parents 97775c1 + 1dfd221 commit c06a842
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/braindrop/app/screens/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ class Main(Screen[None]):

DEFAULT_CSS = """
Main {
layout: horizontal;
Navigation {
width: 2fr;
height: 1fr;
Expand Down Expand Up @@ -201,16 +203,11 @@ def __init__(self, api: API) -> None:
def compose(self) -> ComposeResult:
"""Compose the content of the screen."""
yield Header()
with Horizontal():
yield Navigation(self._api, classes="focus").data_bind(
Main.active_collection
)
yield RaindropsView(classes="focus").data_bind(
raindrops=Main.active_collection
)
yield RaindropDetails(classes="focus").data_bind(
raindrop=Main.highlighted_raindrop
)
yield Navigation(self._api, classes="focus").data_bind(Main.active_collection)
yield RaindropsView(classes="focus").data_bind(raindrops=Main.active_collection)
yield RaindropDetails(classes="focus").data_bind(
raindrop=Main.highlighted_raindrop
)
yield Footer()

@work
Expand Down

0 comments on commit c06a842

Please sign in to comment.