mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
show phrase length in list
This commit is contained in:
parent
efdc135cae
commit
ea88622081
2 changed files with 11 additions and 2 deletions
|
|
@ -16,8 +16,11 @@ impl Content for PhrasePool<Tui> {
|
|||
fn content (&self) -> impl Widget<Engine = Tui> {
|
||||
let content = col!(
|
||||
(i, phrase) in self.phrases.iter().enumerate() => Layers::new(|add|{
|
||||
let Phrase { ref name, color, .. } = *phrase.read().unwrap();
|
||||
let row1 = format!(" {i}");
|
||||
let Phrase { ref name, color, length, .. } = *phrase.read().unwrap();
|
||||
let row1 = lay!(
|
||||
format!(" {i}").align_w().fill_x(),
|
||||
format!("{length} ").align_e().fill_x(),
|
||||
).fill_x();
|
||||
let row2 = if let Some(PhrasePoolMode::Rename(phrase, _)) = self.mode {
|
||||
if self.focused && i == phrase {
|
||||
format!(" {}▄", name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue