提交 44628ba6 编写于 作者: B Ben S

Standardise on a grey

上级 0a1d3f56
......@@ -46,6 +46,8 @@ impl Colour {
}
}
pub static Grey: Colour = Fixed(244);
// There are only three different styles: plain (no formatting), only
// a foreground colour, and a catch-all for anything more complicated
// than that. It's technically possible to write other cases such as
......
use colours::{Plain, Style, Black, Red, Green, Yellow, Blue, Purple, Cyan, Fixed};
use colours::{Plain, Style, Red, Green, Yellow, Blue, Purple, Cyan, Grey};
use std::io::{fs, IoResult};
use std::io;
use std::str::from_utf8_lossy;
......@@ -115,7 +115,7 @@ impl<'a> File<'a> {
Cyan.paint(self.stat.unstable.blocks.to_str().as_slice())
}
else {
Fixed(244).paint("-")
Grey.paint("-")
}
},
......@@ -175,7 +175,7 @@ impl<'a> File<'a> {
// that reason anyway.
match link_target {
Ok(file) => format!("{} {}", Fixed(244).paint("=>"), file.file_colour().paint(filename.as_slice())),
Ok(file) => format!("{} {}", Grey.paint("=>"), file.file_colour().paint(filename.as_slice())),
Err(_) => format!("{} {}", Red.paint("=>"), Red.underline().paint(filename.as_slice())),
}
}
......@@ -184,7 +184,7 @@ impl<'a> File<'a> {
// Don't report file sizes for directories. I've never looked
// at one of those numbers and gained any information from it.
if self.stat.kind == io::TypeDirectory {
Fixed(244).paint("-")
Grey.paint("-")
} else {
let (size, suffix) = if use_iec_prefixes {
format_IEC_bytes(self.stat.size)
......@@ -234,7 +234,7 @@ impl<'a> File<'a> {
if bits.contains(bit) {
style.paint(character.as_slice())
} else {
Black.bold().paint("-".as_slice())
Grey.paint("-".as_slice())
}
}
}
use colours::{Plain, Style, Red, Green, Yellow, Blue, Cyan, Fixed};
use colours::{Plain, Style, Red, Green, Yellow, Blue, Cyan, Grey, Fixed};
use file::File;
use std::io;
......@@ -60,7 +60,7 @@ impl FileType {
Crypto => Fixed(109).normal(),
Document => Fixed(105).normal(),
Compressed => Red.normal(),
Temp => Fixed(244).normal(),
Temp => Grey.normal(),
Immediate => Yellow.bold().underline(),
Compiled => Fixed(137).normal(),
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册