Do UTF8-aware truncation on long item names in editor item
This commit is contained in:
parent
fc828971f1
commit
436c59d8ef
1 changed files with 1 additions and 5 deletions
|
@ -538,11 +538,7 @@ impl Item for Editor {
|
||||||
let description = path.to_string_lossy();
|
let description = path.to_string_lossy();
|
||||||
Some(
|
Some(
|
||||||
Label::new(
|
Label::new(
|
||||||
if description.len() > MAX_TAB_TITLE_LEN {
|
util::truncate_and_trailoff(&description, MAX_TAB_TITLE_LEN),
|
||||||
description[..MAX_TAB_TITLE_LEN].to_string() + "…"
|
|
||||||
} else {
|
|
||||||
description.into()
|
|
||||||
},
|
|
||||||
style.description.text.clone(),
|
style.description.text.clone(),
|
||||||
)
|
)
|
||||||
.contained()
|
.contained()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue