mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
arranger: area corners
This commit is contained in:
parent
72afc45f5e
commit
b0f4919030
2 changed files with 16 additions and 8 deletions
|
|
@ -46,10 +46,14 @@ render!(Arranger |self, buf, area| {
|
|||
};
|
||||
match self.focus_sequencer {
|
||||
true => {
|
||||
"[Arrows] Move, [A]dd, [D]elete, [R]ecord, [P]lay".blit(buf, area.x + 1, area.height - 1, None)?;
|
||||
"[Arrows] Move, [A]dd, [D]elete, [R]ecord, [P]lay".blit(
|
||||
buf, area.x + 1, area.height - 1, Some(Style::default().dim())
|
||||
)?;
|
||||
},
|
||||
false => {
|
||||
"[Arrows] Move, [P]lay, [R]ecord, [N]ame, [E]dit, [C-T]rack add, [C-A]dd scene".blit(buf, area.x + 1, area.y + arrangement.height, None)?;
|
||||
"[Arrows] Move, [P]lay, [R]ecord, [N]ame, [E]dit, [C-T]rack add, [C-A]dd scene".blit(
|
||||
buf, area.x + 1, area.y + arrangement.height, Some(Style::default().dim())
|
||||
)?;
|
||||
},
|
||||
}
|
||||
Corners(Style::default().green().not_dim()).draw(buf, match self.focus_sequencer {
|
||||
|
|
|
|||
|
|
@ -76,15 +76,15 @@ fn cursor_focus <'a> (
|
|||
state: &'a Arranger, offset: u16, cols: &'a [(usize, usize)], rows: &'a [(usize, usize)],
|
||||
) -> impl Render + 'a {
|
||||
move |buf: &mut Buffer, area: Rect| {
|
||||
match state.selected {
|
||||
let area = match state.selected {
|
||||
ArrangerFocus::Mix => if state.focused
|
||||
&& state.entered
|
||||
&& state.selected == ArrangerFocus::Mix
|
||||
{
|
||||
fill_bg(buf, area, Nord::bg_hi(state.focused, state.entered));
|
||||
Corners(Style::default().green().not_dim()).draw(buf, area)
|
||||
area
|
||||
} else {
|
||||
Ok(area)
|
||||
area
|
||||
},
|
||||
ArrangerFocus::Track(t) => {
|
||||
let area = Rect {
|
||||
|
|
@ -94,7 +94,7 @@ fn cursor_focus <'a> (
|
|||
height: area.height
|
||||
};
|
||||
fill_bg(buf, area, Nord::bg_hi(state.focused, state.entered));
|
||||
Corners(Style::default().green().not_dim()).draw(buf, area)
|
||||
area
|
||||
},
|
||||
ArrangerFocus::Scene(s) => {
|
||||
let area = Rect {
|
||||
|
|
@ -104,7 +104,7 @@ fn cursor_focus <'a> (
|
|||
height: (rows[s].0 / 96) as u16
|
||||
};
|
||||
fill_bg(buf, area, Nord::bg_hi(state.focused, state.entered));
|
||||
Corners(Style::default().green().not_dim()).draw(buf, area)
|
||||
area
|
||||
},
|
||||
ArrangerFocus::Clip(t, s) => {
|
||||
let track_area = Rect {
|
||||
|
|
@ -130,9 +130,13 @@ fn cursor_focus <'a> (
|
|||
fill_bg(buf, track_area, lo);
|
||||
fill_bg(buf, scene_area, lo);
|
||||
fill_bg(buf, area, hi);
|
||||
Corners(Style::default().green().not_dim()).draw(buf, area)
|
||||
area
|
||||
},
|
||||
};
|
||||
if !state.focus_sequencer {
|
||||
Corners(Style::default().green().not_dim()).draw(buf, area)?;
|
||||
}
|
||||
Ok(area)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue