ui-contract: the replay audit prints both sides of a shape difference

egui's display names a shape by its rects only, which looked equal when
the fill differed.
This commit is contained in:
aiongg
2026-11-21 05:50:51 +00:00
parent 28d9be1f75
commit 1c6eb5e52a
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -350,6 +350,10 @@ impl Record {
// The display names a widget by its rect only; the difference may be in its sense, state or interact rect.
Some(egui::PassRecordsDiff::Widget { index, left, right }) => found.push(format!("widget rect {index}: left {left:?} / right {right:?}")),
// The display names a node by its bounds only; the difference may be in any other property.
// The display names a shape by its rects only; the difference may be in its colour, stroke, texture or text.
Some(egui::PassRecordsDiff::Shape { layer, index, left, right }) => {
found.push(format!("paint: shape {index} on {layer:?}: left {left:?} / right {right:?}"))
}
Some(egui::PassRecordsDiff::Node { index, left, right }) => {
found.push(format!("AccessKit node {index}: left {left:?} / right {right:?}"))
}
@@ -101,7 +101,7 @@ fn the_audit_names_a_view_whose_paint_went_stale() {
});
assert!(message.contains("Swatch"), "names the view: {message}");
assert!(message.contains("paint"), "names the paint difference: {message}");
assert!(!message.contains("rect:") && !message.contains("output:"), "extent and output are the same: {message}");
assert!(!message.contains("rect: left") && !message.contains("output:"), "extent and output are the same: {message}");
}
/// A view that returns a fraction of `HIDDEN`, which its props do not hold, and paints nothing from it.