Call the record's boxes what they are
The offer names are from the protocol before this one, where a widget was drawn twice and the record had to say which drawing was the question. It is asked once now, so offer_part is the part it was asked in, offer_place the place it was asked at, and place where its drawing was put: part, asked and placed. LayoutHolds::frame is a range on the window since the frame became a length of one, and the frame's own entry is the frame_len pin beside it, so it is window; Painter::frame_own goes with it. answers_at had one caller and said less than the line that replaces it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
adbedaf264
commit
a30971e4c5
6 files changed
+67
-71
No files matched your search
@@ -124,7 +124,7 @@ fn padding_keeps_the_frame_distinct_from_the_room_left_in_a_row() {
|
||||
h.set_root((icon, padded).span(Dir::RIGHT).width(rel(1.0)));
|
||||
let active = &h.render.active[&text.id()];
|
||||
let window = h.render.output_size().x;
|
||||
let asked = active.offer_part.x.len().to_px(window);
|
||||
let asked = active.part.x.len().to_px(window);
|
||||
assert_eq!(active.frame.x.to_px(window), Px::from_int(868));
|
||||
assert_eq!(asked, Px::from_int(844));
|
||||
}
|
||||
@@ -171,7 +171,7 @@ fn padding_narrows_both_frame_and_box_inside_a_share() {
|
||||
let active = &h.render.active[&text.id()];
|
||||
let window = h.render.output_size().x;
|
||||
assert_eq!(active.frame.x.to_px(window), Px::from_int(418));
|
||||
assert_eq!(active.offer_part.x.len().to_px(window), Px::from_int(418));
|
||||
assert_eq!(active.part.x.len().to_px(window), Px::from_int(418));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -407,7 +407,7 @@ fn record(id: WidgetId, h: &Harness) -> String {
|
||||
let active = &h.render.active[&id];
|
||||
format!(
|
||||
"frame {} ask {} box {} size {}",
|
||||
active.frame, active.offer_part, active.extent, active.size,
|
||||
active.frame, active.part, active.extent, active.size,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user