Pad color boxes by fboxsep

This commit is contained in:
gloamxun committed 2026-10-26 04:11:42 +08:00
1 parent 8e274a252d
commit 0340878909
3 files changed
+19 -10

No files matched your search

+4 -1
View File
@@ -6657,12 +6657,15 @@ mod tests {
.items
.iter()
.find_map(|item| match item {
crate::render::DisplayItem::Rect { color, width, .. } => Some((*color, *width)),
crate::render::DisplayItem::Rect {
color, width, x, ..
} => Some((*color, *width, *x)),
_ => None,
})
.expect("background rect");
assert_eq!(rect.0, [0, 255, 0]);
assert!(rect.1 > 0);
assert_eq!(rect.2, -3 * 65_536);
}
#[test]