From 6a02da62d4f5c1362ef010e8320a5c343aaa3db7 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 01:09:59 +0000 Subject: [PATCH] Iconic column trial: the rule between icon groups spans more than half the rail, asserted as a relation --- crates/ui-panels/src/docking/iconic/trials.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui-panels/src/docking/iconic/trials.rs b/crates/ui-panels/src/docking/iconic/trials.rs index 3b0485222..b3d65d665 100644 --- a/crates/ui-panels/src/docking/iconic/trials.rs +++ b/crates/ui-panels/src/docking/iconic/trials.rs @@ -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"); }