mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
sorta working simplified focus!
This commit is contained in:
parent
777904cb35
commit
9f358f8a21
5 changed files with 47 additions and 121 deletions
|
|
@ -37,17 +37,11 @@ impl<'a> Render for TrackView<'a> {
|
|||
_ => { unimplemented!() },
|
||||
}
|
||||
fill_bg(buf, area, Nord::bg_lo(self.focused, self.entered));
|
||||
let devices: Vec<&(dyn Render + Send + Sync)> = chain.devices.as_slice()
|
||||
.iter()
|
||||
.map(|d|d as &(dyn Render + Send + Sync))
|
||||
.collect();
|
||||
let (area, areas) = self.direction
|
||||
.split_focus(0, devices.as_slice(), if self.focused {
|
||||
Style::default().green().dim()
|
||||
} else {
|
||||
Style::default().dim()
|
||||
})
|
||||
.render_areas(buf, area)?;
|
||||
let mut split = Split::new(self.direction);
|
||||
for device in chain.devices.as_slice().iter() {
|
||||
split = split.add_ref(device);
|
||||
}
|
||||
let (area, areas) = split.render_areas(buf, area)?;
|
||||
if self.focused && self.entered && areas.len() > 0 {
|
||||
Corners(Style::default().green().not_dim()).draw(buf, areas[0])?;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue