diff options
author | rabite <rabite@posteo.de> | 2019-01-29 15:47:45 +0100 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2019-01-29 15:47:45 +0100 |
commit | ca521059e46ec5b9ff04bfad60284b9eb7ebcb1b (patch) | |
tree | 73b5e08b863d0e85a3ba1ea12750a3c9705ff831 /src/files.rs | |
parent | 3a2b02cba6bd2c74a96923354dc205ffa1758a94 (diff) |
listview fixes
Diffstat (limited to 'src/files.rs')
-rw-r--r-- | src/files.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/files.rs b/src/files.rs index 1d652e1..1473fd5 100644 --- a/src/files.rs +++ b/src/files.rs @@ -49,12 +49,12 @@ impl Files { let size = meta.len() / 1024; let mtime = meta.modified()?; - let style + let color = match COLORS.style_for_path_with_metadata(file.path(), Some(&meta)) { - Some(style) => Some(style.clone()), + Some(style) => { style.clone().foreground }, None => None }; - let file = File::new(&name, path, kind, size as usize, mtime, style); + let file = File::new(&name, path, kind, size as usize, mtime, color); files.push(file) } @@ -151,7 +151,7 @@ pub struct File { pub size: Option<usize>, pub kind: Kind, pub mtime: SystemTime, - pub style: Option<Style>, + pub color: Option<lscolors::Color>, // owner: Option<String>, // group: Option<String>, // flags: Option<String>, @@ -164,14 +164,14 @@ impl File { kind: Kind, size: usize, mtime: SystemTime, - style: Option<Style>) -> File { + color: Option<lscolors::Color>) -> File { File { name: name.to_string(), path: path, size: Some(size), kind: kind, mtime: mtime, - style: style + color: color // owner: None, // group: None, // flags: None, |