v0.2.14 : 9 nouveaux themes - nord, solarized, gruvbox, catppuccin, tokyo-night, monokai, matrix, rose-pine, amber (15 au total), liste des themes sur deux lignes dans la banniere

This commit is contained in:
2026-08-16 21:01:15 -04:00
parent b3437b0601
commit f968d7d0b0
5 changed files with 172 additions and 15 deletions
+15 -10
View File
@@ -572,11 +572,16 @@ pub fn banner_box(
.map(|t| t.name)
.filter(|n| *n != theme.name)
.collect();
rows.push(inner(dim(
&format!(" ⇄ {}", theme_others.join(" · ")),
theme,
color,
)));
// The full list may not fit one line: wrap it into two ⇄ lines.
let half = theme_others.len().div_ceil(2);
for (i, chunk) in theme_others.chunks(half).enumerate() {
let line = format!(
"{}⇄ {}",
if i == 0 { " " } else { " " },
chunk.join(" · ")
);
rows.push(inner(dim(&line, theme, color)));
}
rows.push(inner(dim(
" 'am --theme <name>' to switch · settings.theme in the config",
theme,
@@ -1623,13 +1628,13 @@ mod tests {
// The splash screen shows the active theme and every other theme.
assert!(text.contains("Theme"));
assert!(text.contains("◉ default"));
assert!(text.contains("ocean"));
assert!(text.contains("sunset"));
assert!(text.contains("forest"));
assert!(text.contains("dracula"));
assert!(text.contains("mono"));
assert!(text.contains("theme default"));
assert!(text.contains("--theme <name>"));
for t in crate::theme::THEMES {
if t.name != "default" {
assert!(text.contains(t.name), "banner misses theme {}", t.name);
}
}
}
#[test]