v0.2.14 : barres verticales des cadres aux couleurs du theme + commande theme dans le shell (theme liste les themes, theme <name> change a chaud, completion et menu synchronises)
This commit is contained in:
+11
-2
@@ -153,8 +153,17 @@ impl DataTable {
|
||||
line.push(right);
|
||||
line
|
||||
};
|
||||
let bar = |s: &str| -> String {
|
||||
if !color {
|
||||
return s.to_string();
|
||||
}
|
||||
match theme {
|
||||
Some(t) => t.frame(s),
|
||||
None => s.to_string(),
|
||||
}
|
||||
};
|
||||
let row_line = |row: &[String], header: bool| -> String {
|
||||
let mut line = String::from("│");
|
||||
let mut line = bar("│");
|
||||
for (i, c) in row.iter().enumerate().take(all_widths.len()) {
|
||||
line.push(' ');
|
||||
let cell = fit_cell(c, all_widths[i]);
|
||||
@@ -168,7 +177,7 @@ impl DataTable {
|
||||
};
|
||||
line.push_str(&rendered);
|
||||
line.push(' ');
|
||||
line.push('│');
|
||||
line.push_str(&bar("│"));
|
||||
}
|
||||
line
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user