Files: a tile's name keeps its ends; the ellipses share one line cutter
gpui's line_clamp wraps once and lays the rest of a long name on the second line, which a centered tile then clipped at both ends. A tile's name is now one line, cut in the middle so the front and the extension stay. MiddleEllipsis draws like Ellipsis: in the text style around it, sized by its text, so a short name centers; the two share one cutter.
This commit is contained in:
1 parent
a846e10847
commit
501d1b0f1a
6 files changed
+87
-59
No files matched your search
@@ -44,6 +44,11 @@ fn entries() -> Vec<DirEntry> {
|
||||
DirEntry::file("Walkthrough.mov", 184_000_000, ago(120)),
|
||||
DirEntry::file("main.rs", 9_200, ago(1)),
|
||||
DirEntry::file("Archive.zip", 48_000_000, ago(700)),
|
||||
DirEntry::file(
|
||||
"Quarterly review with the design team, final.pdf",
|
||||
820_000,
|
||||
ago(6),
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user