mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
set minimum track width
This commit is contained in:
parent
0f6c09cf2b
commit
3010c9ef5d
2 changed files with 2 additions and 2 deletions
|
|
@ -524,7 +524,7 @@ impl<E: Engine> ArrangementTrack<E> {
|
|||
self.width += 1;
|
||||
}
|
||||
pub fn width_dec (&mut self) {
|
||||
if self.width > 1 {
|
||||
if self.width > 3 {
|
||||
self.width -= 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ impl<'a> Content for VerticalArranger<'a, Tui> {
|
|||
// track titles
|
||||
let track_titles = row!((track, w) in tracks.iter().zip(cols.iter().map(|col|col.0))=>{
|
||||
let name = track.name.read().unwrap();
|
||||
let max_w = w.saturating_sub(1).min(name.len());
|
||||
let max_w = w.saturating_sub(1).min(name.len()).max(2);
|
||||
(&format!("▎{}", &name[0..max_w]).as_str())
|
||||
.min_xy(w as u16, 2)
|
||||
.bg(track.color)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue