search path ellipsis (#2029)
Co-authored-by: Alex Klepov <alexezm@ya.ru>
This commit is contained in:
parent
b845e18efd
commit
dfae6e1976
1 changed files with 16 additions and 2 deletions
18
src/tab.rs
18
src/tab.rs
|
|
@ -6192,11 +6192,18 @@ impl Tab {
|
||||||
.size(icon_size)
|
.size(icon_size)
|
||||||
.into(),
|
.into(),
|
||||||
widget::column::with_children([
|
widget::column::with_children([
|
||||||
Item::list_display_name(item.display_name.clone()).into(),
|
Item::list_display_name(item.display_name.clone())
|
||||||
|
.ellipsize(text::Ellipsize::Middle(text::EllipsizeHeightLimit::Lines(
|
||||||
|
1,
|
||||||
|
)))
|
||||||
|
.into(),
|
||||||
widget::text::caption(match item.path_opt() {
|
widget::text::caption(match item.path_opt() {
|
||||||
Some(path) => path.display().to_string(),
|
Some(path) => path.display().to_string(),
|
||||||
None => String::new(),
|
None => String::new(),
|
||||||
})
|
})
|
||||||
|
.ellipsize(text::Ellipsize::Middle(text::EllipsizeHeightLimit::Lines(
|
||||||
|
1,
|
||||||
|
)))
|
||||||
.into(),
|
.into(),
|
||||||
])
|
])
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
|
|
@ -6298,11 +6305,18 @@ impl Tab {
|
||||||
.size(icon_size)
|
.size(icon_size)
|
||||||
.into(),
|
.into(),
|
||||||
widget::column::with_children([
|
widget::column::with_children([
|
||||||
Item::list_display_name(item.display_name.clone()).into(),
|
Item::list_display_name(item.display_name.clone())
|
||||||
|
.ellipsize(text::Ellipsize::Middle(text::EllipsizeHeightLimit::Lines(
|
||||||
|
1,
|
||||||
|
)))
|
||||||
|
.into(),
|
||||||
widget::text::caption(match item.path_opt() {
|
widget::text::caption(match item.path_opt() {
|
||||||
Some(path) => path.display().to_string(),
|
Some(path) => path.display().to_string(),
|
||||||
None => String::new(),
|
None => String::new(),
|
||||||
})
|
})
|
||||||
|
.ellipsize(text::Ellipsize::Middle(text::EllipsizeHeightLimit::Lines(
|
||||||
|
1,
|
||||||
|
)))
|
||||||
.into(),
|
.into(),
|
||||||
])
|
])
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue