mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-12-29 02:53:06 +00:00
Added painting to icon
This commit is contained in:
parent
694c4417a0
commit
d962889134
@ -40,11 +40,14 @@ impl<'a> Render<'a> {
|
||||
|
||||
for file in self.files.iter() {
|
||||
let file_icon = icon(&file);
|
||||
let painted_icon = self.style.exts
|
||||
.colour_file(&file)
|
||||
.map_or(file_icon.to_string(), |c| { c.paint(format!("{}", file_icon)).to_string() });
|
||||
let filename = self.style.for_file(file, self.colours).paint();
|
||||
let width = DisplayWidth::from(2) + filename.width();
|
||||
|
||||
grid.add(tg::Cell {
|
||||
contents: format!("{} {}", file_icon, filename.strings().to_string()),
|
||||
contents: format!("{} {}", painted_icon, filename.strings().to_string()),
|
||||
width: *width,
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user