This commit is contained in:
i do not exist 2026-06-19 20:23:53 +03:00
parent b44dc635ef
commit 80fe958476
8 changed files with 69 additions and 45 deletions

View file

@ -368,7 +368,7 @@ def_sizes_iter!(TracksSizes => Track);
/// let _ = tek::view_logo();
/// ```
pub fn view_logo () -> impl Draw<Tui> {
wh_exact(32, 7, bold(true, fg(Rgb(240,200,180), south!{
wh_exact(Some(32), Some(7), bold(true, fg(Rgb(240, 200, 180), south!{
h_exact(1, ""),
h_exact(1, ""),
h_exact(1, "~~ ╓─╥─╖ ╓──╖ ╥ ╖ ~~~~~~~~~~~~"),
@ -384,9 +384,9 @@ pub fn view_logo () -> impl Draw<Tui> {
/// ```
pub fn view_transport (
play: bool,
bpm: Arc<RwLock<String>>,
beat: Arc<RwLock<String>>,
time: Arc<RwLock<String>>,
bpm: &Arc<RwLock<String>>,
beat: &Arc<RwLock<String>>,
time: &Arc<RwLock<String>>,
) -> impl Draw<Tui> {
let theme = ItemTheme::G[96];
bg(Black, east!(above(
@ -788,7 +788,7 @@ fn app_interpret_word (state: &App, to: &mut Tui, dsl: &impl Expression) -> Usua
Some(":templates") => {
let modes = state.config.modes.clone();
let height = (modes.read().unwrap().len() * 2) as u16;
h_exact(height, w_min(30, thunk(move |to: &mut Tui|{
h_exact(height, w_min(Some(30), thunk(move |to: &mut Tui|{
for (index, (id, profile)) in modes.read().unwrap().iter().enumerate() {
let bg = if index == 0 { Rgb(70,70,70) } else { Rgb(50,50,50) };
let name = profile.name.get(0).map(|x|x.as_ref()).unwrap_or("<no name>");
@ -804,7 +804,7 @@ fn app_interpret_word (state: &App, to: &mut Tui, dsl: &impl Expression) -> Usua
}
})))
}.draw(to),
Some(":sessions") => h_exact(6, w_min(30, thunk(|to: &mut Tui|{
Some(":sessions") => h_exact(Some(6), w_min(Some(30), thunk(|to: &mut Tui|{
let fg = Rgb(224, 192, 128);
for (index, name) in ["session1", "session2", "session3"].iter().enumerate() {
let bg = if index == 0 { Rgb(50,50,50) } else { Rgb(40,40,40) };