sequencer zoom; still slooo

This commit is contained in:
🪞👃🪞 2024-07-02 16:30:16 +03:00
parent 939ffe3630
commit 2f96897d39
9 changed files with 111 additions and 73 deletions

View file

@ -172,7 +172,7 @@ pub fn render (state: &Plugin, buf: &mut Buffer, area: Rect)
-> Usually<Rect>
{
let Rect { x, y, height, .. } = area;
let mut width = 40u16;
let mut width = 20u16;
match &state.plugin {
Some(PluginKind::LV2(LV2Plugin { port_list, instance, .. })) => {
let start = state.selected.saturating_sub((height as usize / 2).saturating_sub(1));
@ -185,8 +185,9 @@ pub fn render (state: &Plugin, buf: &mut Buffer, area: Rect)
} else {
port.default_value
};
let label = &format!("C·· M·· {:25} = {value:.03}", port.name);
width = width.max(label.len() as u16);
//let label = &format!("C·· M·· {:25} = {value:.03}", port.name);
let label = &format!("{:25} = {value:.03}", port.name);
width = width.max(label.len() as u16 + 4);
label.blit(buf, x + 2, y + 1 + i as u16 - start as u16, if i == state.selected {
Some(Style::default().green())
} else {