you can play your song now :D

This commit is contained in:
2026-01-15 07:58:09 +11:00
parent 6350de7899
commit 6a96bdd86a
7 changed files with 135 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
from textual.app import App, ComposeResult
from textual.widgets import Footer, Tab, Tabs, Header
from textual import on, events
from ui.widgets.sidebar import Sidebar
from ui.widgets.timeline import Timeline, TimelineRow
@@ -12,13 +13,20 @@ from project import ProjectChannel
class AppUI(App):
CSS_PATH = "../assets/style.tcss"
theme = "tokyo-night"
def __init__(self, project):
super().__init__()
self.zoom_level = 0.05
self.last_zoom_level = self.zoom_level
self.project = project
@on(events.Key)
async def key_pressed(self, event: events.Key):
if event.key == "space":
timeline = self.query_one(Timeline)
if not timeline.song_player.paused:
timeline.song_player.pause()
else:
timeline.song_player.play_project(self.app.project)
def create_channel(self, name: str):
self.query_one("#channels").mount(Channel(