Themes: Okibi's and Akari's start page rail is the void, not the ember (#7061)
Neither theme set the File view's rail colours, so SolidCraft derived the rail from the accent and the start page's whole sidebar was the primary orange, against the design system's one-or-two ember budget (#4868 derives an unset rail from the accent). The rail is now n0 (void, beside the app bar), its hovered and open row n3 (raised), and its text n11.
This commit is contained in:
@@ -54,6 +54,9 @@
|
||||
"dimension_driven": "#6c6863",
|
||||
"error": "#c71529",
|
||||
"field": "#fffdfa",
|
||||
"file_rail": "#e1ddd8",
|
||||
"file_rail_hover": "#ebe7e2",
|
||||
"file_rail_ink": "#13110e",
|
||||
"form_accent": "#5844bc",
|
||||
"form_dim": "#6c6863",
|
||||
"form_error": "#c71529",
|
||||
|
||||
@@ -54,6 +54,9 @@
|
||||
"dimension_driven": "#8f9296",
|
||||
"error": "#f85052",
|
||||
"field": "#2c2e31",
|
||||
"file_rail": "#0f1113",
|
||||
"file_rail_hover": "#222527",
|
||||
"file_rail_ink": "#e1e3e5",
|
||||
"form_accent": "#a6a2fc",
|
||||
"form_dim": "#8f9296",
|
||||
"form_error": "#ff6060",
|
||||
|
||||
@@ -861,6 +861,19 @@ mod tests {
|
||||
assert_eq!(resolve(&own).file_rail, Color32::from_rgb(0x10, 0x20, 0x30));
|
||||
}
|
||||
|
||||
/// Okibi and Akari spend their ember on one or two marks a screen: the start page's rail is
|
||||
/// one of their neutrals, not their accent.
|
||||
#[test]
|
||||
fn okibi_and_akari_rails_are_neutral() {
|
||||
for id in ["okibi", "akari"] {
|
||||
let t = resolve(builtin().iter().find(|t| t.id == id).unwrap());
|
||||
for c in [t.file_rail, t.file_rail_hover] {
|
||||
let [r, g, b, _] = c.to_array();
|
||||
assert!(r.max(g).max(b) - r.min(g).min(b) <= 12, "{id}: {c:?} is tinted");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_short_file_sets_only_its_colours() {
|
||||
let t = parse(r##"{"format":"solidcraft-theme/1","name":"My Theme!","base":"light","colors":{"panel":"#102030","axis_z":"#0000ff80"}}"##)
|
||||
|
||||
Reference in New Issue
Block a user