mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 20:56:43 +01:00
rename Split to Stack
This commit is contained in:
parent
2adf0028c3
commit
e555074bdf
8 changed files with 42 additions and 42 deletions
|
|
@ -491,8 +491,8 @@ impl<'a> Content for VerticalArranger<'a, Tui> {
|
|||
let cols = cols.as_ref();
|
||||
add(&VerticalArrangerGrid(offset, &rows, &cols))?;
|
||||
add(&VerticalArrangerCursor(state.focused, state.selected, offset, &cols, &rows))?;
|
||||
add(&Split::down(|add|{
|
||||
add(&Split::right(move |add|{
|
||||
add(&Stack::down(|add|{
|
||||
add(&Stack::right(move |add|{
|
||||
for (track, (w, _)) in tracks.iter().zip(cols) {
|
||||
add(&Layers::new(|add|{
|
||||
add(&Background(COLOR_BG1))?;
|
||||
|
|
@ -501,12 +501,12 @@ impl<'a> Content for VerticalArranger<'a, Tui> {
|
|||
}
|
||||
Ok(())
|
||||
}).push_x(offset))?;
|
||||
add(&Split::down(move |add| {
|
||||
add(&Stack::down(move |add| {
|
||||
for (scene, (pulses, _)) in scenes.iter().zip(rows) {
|
||||
let height = 1.max((pulses / 96) as u16);
|
||||
let playing = scene.is_playing(tracks);
|
||||
add(&Split::right(move |add| {
|
||||
add(&Split::right(|add|{
|
||||
add(&Stack::right(move |add| {
|
||||
add(&Stack::right(|add|{
|
||||
add(&if playing { "▶ " } else { " " })?;
|
||||
add(&scene.name.read().unwrap().as_str())
|
||||
}).fixed_xy(offset.saturating_sub(1), height))?;
|
||||
|
|
@ -671,7 +671,7 @@ impl<'a> Content for HorizontalArranger<'a, Tui> {
|
|||
let tracks = tracks.as_slice();
|
||||
Layers::new(|add|{
|
||||
add(&focused.then_some(Background(COLOR_BG0)))?;
|
||||
add(&Split::right(|add|{
|
||||
add(&Stack::right(|add|{
|
||||
add(&TrackNameColumn(tracks, *selected))?;
|
||||
add(&TrackMonitorColumn(tracks))?;
|
||||
add(&TrackRecordColumn(tracks))?;
|
||||
|
|
@ -1578,7 +1578,7 @@ struct SequenceNoteRange;
|
|||
impl Content for SequenceNoteRange {
|
||||
type Engine = Tui;
|
||||
fn content (&self) -> impl Widget<Engine = Tui> {
|
||||
Split::down(|add|{
|
||||
Stack::down(|add|{
|
||||
//Lozenge(Style::default().fg(Nord::BG2)).draw(to.with_rect(range))?;
|
||||
add(&"Notes: ")?;//Some(STYLE_LABEL));
|
||||
add(&"C#0-C#9 ")?;//Some(STYLE_VALUE));
|
||||
|
|
@ -2086,7 +2086,7 @@ impl Handle<Tui> for TransportToolbar<Tui> {
|
|||
impl Content for TransportToolbar<Tui> {
|
||||
type Engine = Tui;
|
||||
fn content (&self) -> impl Widget<Engine = Tui> {
|
||||
Split::right(|add|{
|
||||
Stack::right(|add|{
|
||||
let focus_wrap = |focused, component|Layers::new(move |add|{
|
||||
if focused {
|
||||
add(&CORNERS)?;
|
||||
|
|
@ -2232,7 +2232,7 @@ impl Content for TransportBPM<Tui> {
|
|||
type Engine = Tui;
|
||||
fn content (&self) -> impl Widget<Engine = Tui> {
|
||||
let Self { value, .. } = self;
|
||||
Outset::X(1u16, Split::down(move |add|{
|
||||
Outset::X(1u16, Stack::down(move |add|{
|
||||
add(&"BPM")?;
|
||||
add(&format!("{}.{:03}", *value as usize, (value * 1000.0) % 1000.0).as_str())
|
||||
}))
|
||||
|
|
@ -2273,7 +2273,7 @@ impl Content for TransportQuantize<Tui> {
|
|||
type Engine = Tui;
|
||||
fn content (&self) -> impl Widget<Engine = Tui> {
|
||||
let Self { value, .. } = self;
|
||||
Outset::X(1u16, Split::down(|add|{
|
||||
Outset::X(1u16, Stack::down(|add|{
|
||||
add(&"QUANT")?;
|
||||
add(&ppq_to_name(*value as usize))
|
||||
}))
|
||||
|
|
@ -2314,7 +2314,7 @@ impl Content for TransportSync<Tui> {
|
|||
type Engine = Tui;
|
||||
fn content (&self) -> impl Widget<Engine = Tui> {
|
||||
let Self { value, .. } = self;
|
||||
Outset::X(1u16, Split::down(|add|{
|
||||
Outset::X(1u16, Stack::down(|add|{
|
||||
add(&"SYNC")?;
|
||||
add(&ppq_to_name(*value as usize))
|
||||
}))
|
||||
|
|
@ -2353,7 +2353,7 @@ impl Content for TransportClock<Tui> {
|
|||
let (bars, beats) = ((beats / 4) + 1, (beats % 4) + 1);
|
||||
let (seconds, msecs) = (usecs / 1000000, usecs / 1000 % 1000);
|
||||
let (minutes, seconds) = (seconds / 60, seconds % 60);
|
||||
add(&Outset::X(1u16, Split::down(|add|{
|
||||
add(&Outset::X(1u16, Stack::down(|add|{
|
||||
add(&format!("{bars}.{beats}.{pulses:02}").as_str())?;
|
||||
add(&format!("{minutes}:{seconds:02}:{msecs:03}").as_str())
|
||||
})))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue