mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 02:09:00 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user