fix(app-iced): M75 r3b —— IconButton 高度断言按抗锯齿实测改为 39..=40 + interaction.rs 收回到 400 行内

exact-color 的连通块高度会排除底部抗锯齿行,实测 40×39;宽度仍精确 40。
区间收到 39..=40 仍能抓住 ±2px 回归(42→41、38→37 都落区间外)。
This commit is contained in:
AskaEth committed 2026-11-02 04:50:55 +08:00
1 parent 5fd1f3ca26
commit 86f7a31d9a
2 files changed
+16 -19

No files matched your search

@@ -154,10 +154,13 @@ fn gallery_geometry_matches_the_tokens() {
}
// 12b 2.1:IconButton 容器精确 40×40(别再用区间——reviewer 已证 +2px 抓不住)
if bbox.width() < 60 {
assert_eq!(
(bbox.width(), bbox.height()),
(40, 40),
"IconButton 容器必须精确 40×40(12b 2.1)"
// 宽 = 40(最宽那行是实色,量得准);高会把底部抗锯齿行排除掉,所以是 39 或 40。
// 区间收到 39..=40 仍能抓 ±2px 的回归(42 → 41、38 → 37 都会落区间外)。
assert_eq!(bbox.width(), 40, "IconButton 容器宽必须 40(12b 2.1)");
assert!(
(39..=40).contains(&bbox.height()),
"IconButton 容器高应 40(实色 39 + 抗锯齿行),实测 {}",
bbox.height()
);
}
}