feat: termscp 0.13.0

This commit is contained in:
veeso
2024-03-02 19:28:01 +01:00
parent c7469b8594
commit 44051ec718
17 changed files with 199 additions and 61 deletions

View File

@@ -7,7 +7,7 @@ use tuirealm::props::{
Alignment, AttrValue, Attribute, Borders, Color, Style, Table, TextModifiers,
};
use tuirealm::tui::layout::Corner;
use tuirealm::tui::text::{Span, Spans};
use tuirealm::tui::text::{Line, Span};
use tuirealm::tui::widgets::{List as TuiList, ListItem, ListState};
use tuirealm::{MockComponent, Props, State, StateValue};
@@ -211,7 +211,7 @@ impl MockComponent for FileList {
)
})
.collect();
ListItem::new(Spans::from(columns))
ListItem::new(Line::from(columns))
})
.collect(), // Make List item from TextSpan
_ => Vec::new(),
@@ -245,7 +245,7 @@ impl MockComponent for FileList {
if matches!(attr, Attribute::Content) {
self.states.init_list_states(
match self.props.get(Attribute::Content).map(|x| x.unwrap_table()) {
Some(spans) => spans.len(),
Some(line) => line.len(),
_ => 0,
},
);