fix main menu
Some checks failed
/ build (push) Has been cancelled

This commit is contained in:
i do not exist 2026-08-06 18:30:18 +03:00
parent 6a675ec964
commit 4aefaf452c
8 changed files with 260 additions and 246 deletions

View file

@ -8,7 +8,19 @@ mod ticker; pub use self::ticker::*;
mod timebase; pub use self::timebase::*;
mod clock_view; pub use self::clock_view::*;
impl <T: AsRef<Clock>+AsMut<Clock>> HasClock for T {}
impl App {
/// Update memoized render of clock values.
/// ```
/// tek::App::default().update_clock();
/// ```
pub fn update_clock (&self) {
ClockView::update_clock(
&self.project.clock.view_cache, self.clock(), self.size.w() > 80
)
}
}
impl <T: AsRef<Clock>+AsMut<Clock>> HasClock for T {}
pub trait HasClock: AsRef<Clock> + AsMut<Clock> {
fn clock (&self) -> &Clock { self.as_ref() }
fn clock_mut (&mut self) -> &mut Clock { self.as_mut() }