diff --git a/crates/app/src/render.rs b/crates/app/src/render.rs index 541c03b..556a01e 100644 --- a/crates/app/src/render.rs +++ b/crates/app/src/render.rs @@ -687,12 +687,7 @@ impl Render for Player { .child(height_probe(self.notice_h.clone())), ), ) - .child(self.transport_bar( - position, - state, - window.viewport_size(), - cx, - )), + .child(self.transport_bar(state, window.viewport_size(), cx)), ) .child(divider(Split::Inspector, cx)) // The settings cards live in here rather than over the diff --git a/crates/app/src/ui/toolbar.rs b/crates/app/src/ui/toolbar.rs index 687bb21..9e5ade7 100644 --- a/crates/app/src/ui/toolbar.rs +++ b/crates/app/src/ui/toolbar.rs @@ -148,7 +148,6 @@ impl Player { /// and the reason the edit toolbar below is nothing but edit tools. pub(crate) fn transport_bar( &self, - position: f64, state: Transport, viewport: Size, cx: &mut Context, @@ -209,12 +208,14 @@ impl Player { .text_color(rgb(FG_PRIMARY())) .child(format!( "{} / {}", - timecode(position, self.fps), timecode( - self.session - .as_ref() + self.active_session().map_or(0., PlaybackSession::now), + self.active_fps() + ), + timecode( + self.active_session() .map_or(0., PlaybackSession::timeline_duration), - self.fps + self.active_fps() ) )), )