Skip to content

Commit

Permalink
🔀 Merge pull request #22 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 0c9fd97 + f748344 commit c81bee3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/peplum/app/screens/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from textual import on, work
from textual.app import ComposeResult
from textual.command import CommandPalette
from textual.containers import Horizontal
from textual.message import Message
from textual.reactive import var
from textual.screen import Screen
Expand Down Expand Up @@ -97,6 +96,8 @@ class Main(Screen[None]):

DEFAULT_CSS = """
Main {
layout: horizontal;
.panel {
height: 1fr;
border: none;
Expand Down Expand Up @@ -191,12 +192,11 @@ class Main(Screen[None]):
def compose(self) -> ComposeResult:
"""Compose the content of the main screen."""
yield Header()
with Horizontal():
yield Navigation(load_configuration(), classes="panel").data_bind(
Main.all_peps, Main.active_peps
)
yield PEPsView(classes="panel").data_bind(Main.active_peps)
yield PEPDetails(classes="panel").data_bind(pep=Main.selected_pep)
yield Navigation(load_configuration(), classes="panel").data_bind(
Main.all_peps, Main.active_peps
)
yield PEPsView(classes="panel").data_bind(Main.active_peps)
yield PEPDetails(classes="panel").data_bind(pep=Main.selected_pep)
yield Footer()

@dataclass
Expand Down

0 comments on commit c81bee3

Please sign in to comment.