mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 13:16:44 +01:00
set minimum track width
This commit is contained in:
parent
0f6c09cf2b
commit
3010c9ef5d
2 changed files with 2 additions and 2 deletions
|
|
@ -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