Iconic column trial: the rule between icon groups spans more than half the rail, asserted as a relation

This commit is contained in:
aiongg
2026-11-25 01:09:59 +00:00
parent 62816d0e3d
commit 6a02da62d4
@@ -708,7 +708,8 @@ fn icon_groups_apart_by_a_rule_show_one_level_rule_between_them() {
let between: Vec<_> = level.iter().filter(|(a, _, _)| a.y > last.bottom() && a.y < next.top()).collect();
let [(a, b, ink)] = between.as_slice() else { panic!("one rule between the groups: {level:?}") };
let (left, right) = (a.x.min(b.x), a.x.max(b.x));
assert!(left > 0.0 && right < RAIL && right - left > RAIL / 2.0, "the rule reaches across the column, short of its sides: {a:?} to {b:?}");
let span = right - left;
assert!(left > 0.0 && right < RAIL && span > RAIL - span, "the rule reaches across the column, short of its sides: {a:?} to {b:?}");
let [r, g, bl, al] = border.0;
assert_eq!(*ink, egui::Color32::from_rgba_unmultiplied(r, g, bl, al), "the rule is in line.border");
}