mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 13:16:44 +01:00
sequencer zoom; still slooo
This commit is contained in:
parent
939ffe3630
commit
2f96897d39
9 changed files with 111 additions and 73 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue