feat(ui): draw pane frames, page keys and a scroll thumb

This commit is contained in:
beefcarver committed 2026-11-03 20:25:02 -05:00
1 parent 49f7efe0d2
commit 0219df454c
14 files changed
+571 -64

No files matched your search

+10 -3
View File
@@ -11,10 +11,11 @@ from __future__ import annotations
from datetime import date, datetime, timedelta
from typing import TYPE_CHECKING, cast
from rich.console import Group, RenderableType
from rich.console import RenderableType
from rich.text import Text
from textual.widget import Widget
from . import frame
from .common import local_time, local_zone, state_glyph, truncate
if TYPE_CHECKING:
@@ -92,7 +93,8 @@ class SchedulePanel(Widget):
def render(self) -> RenderableType:
app = cast("BeefyPlayerApp", self.app)
width = max(12, self.size.width)
height = max(1, self.size.height)
height = max(3, self.size.height)
width, height = frame.inner_size(width, height)
broadcasts = list(getattr(app, "schedule", ()) or ())
loaded = bool(getattr(app, "schedule_loaded", False))
@@ -134,4 +136,9 @@ class SchedulePanel(Widget):
lines.append(Text(""))
while len(lines) < height:
lines.append(Text(""))
return Group(*lines[:height])
return frame.wrap(
lines[:height],
max(12, self.size.width),
max(3, self.size.height),
self.border_title,
)