2026-01-13 20:06:28 +11:00
|
|
|
from textual.containers import Vertical, VerticalScroll, Horizontal, VerticalGroup
|
|
|
|
|
from textual.widgets import Sparkline
|
2026-01-13 16:06:57 +11:00
|
|
|
from textual.app import ComposeResult
|
|
|
|
|
|
2026-01-13 20:06:28 +11:00
|
|
|
from ui.widgets.chunk_types.audio import AudioChunk
|
|
|
|
|
|
2026-01-13 16:06:57 +11:00
|
|
|
|
|
|
|
|
class TimelineRow(Horizontal):
|
|
|
|
|
DEFAULT_CSS = """
|
|
|
|
|
TimelineRow {
|
|
|
|
|
background: $surface-lighten-1;
|
|
|
|
|
height: 8;
|
|
|
|
|
margin-bottom: 1;
|
|
|
|
|
}
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
class Timeline(VerticalScroll):
|
|
|
|
|
DEFAULT_CSS = """
|
|
|
|
|
Timeline {
|
|
|
|
|
padding: 1 0;
|
|
|
|
|
hatch: "-" $surface-lighten-1;
|
|
|
|
|
}
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def compose(self) -> ComposeResult:
|
2026-01-13 20:06:28 +11:00
|
|
|
with TimelineRow():
|
|
|
|
|
yield AudioChunk("cool sample.mp3")
|
|
|
|
|
with TimelineRow():
|
|
|
|
|
yield AudioChunk("cool sample 2.mp3")
|