Merge branch 'port/deckcraft/red/red-fw-3' into port/deckcraft/area/framework

This commit is contained in:
Dylan M. Taylor committed 2026-11-27 06:17:42 +00:00
commit f43f30daed
4 files changed
+9 -8

No files matched your search

@@ -532,7 +532,8 @@ fn a_fitted_document_shows_no_bar_and_a_zoomed_one_shows_its_overflowing_axes()
let mut next = view.get();
next.zoom = 0.75;
view.set(next);
fixture.frame(vec![]);
// Pointer-only parts are read from the previous pass's shape record.
fixture.idle(2);
assert!(fixture.part_rect(id.get(), horizontal).is_some(), "zooming past the width shows the horizontal bar");
assert!(fixture.part_rect(id.get(), vertical).is_none(), "the fitting height has no bar");
assert!(fixture.part_rect(id.get(), corner).is_none(), "one bar has no corner");
@@ -541,7 +542,7 @@ fn a_fitted_document_shows_no_bar_and_a_zoomed_one_shows_its_overflowing_axes()
next.zoom = 1.5;
next.aspect = 0.25;
view.set(next);
fixture.frame(vec![]);
fixture.idle(2);
assert!(fixture.part_rect(id.get(), horizontal).is_none(), "the narrow pixel aspect fits horizontally");
assert!(fixture.part_rect(id.get(), vertical).is_some(), "the height alone overflows");
assert!(fixture.part_rect(id.get(), corner).is_none(), "the vertical bar alone has no corner");
@@ -550,7 +551,7 @@ fn a_fitted_document_shows_no_bar_and_a_zoomed_one_shows_its_overflowing_axes()
next.aspect = 1.0;
next.zoom = 2.0;
view.set(next);
fixture.frame(vec![]);
fixture.idle(2);
assert!(fixture.part_rect(id.get(), horizontal).is_some() && fixture.part_rect(id.get(), vertical).is_some(), "both overflowing axes show");
assert!(fixture.part_rect(id.get(), corner).is_some(), "two document bars share a corner");
let thumb = fixture.part_rect(id.get(), horizontal.at(THUMB)).expect("the horizontal thumb");
@@ -559,11 +560,11 @@ fn a_fitted_document_shows_no_bar_and_a_zoomed_one_shows_its_overflowing_axes()
fitted.zoom = 0.4;
fitted.center = doc.center();
view.set(fitted);
fixture.frame(vec![]);
fixture.idle(2);
assert!(fixture.part_rect(id.get(), horizontal).is_some(), "the held thumb keeps its bar when the host fits the document");
assert!(fixture.part_rect(id.get(), vertical).is_none(), "an unheld axis follows the fit");
assert!(fixture.part_rect(id.get(), corner).is_none(), "a held bar alone has no corner");
fixture.frame(vec![pointer::release(thumb.center())]).frame(vec![]);
fixture.frame(vec![pointer::release(thumb.center())]).idle(2);
assert!(fixture.by_role(Role::SCROLL_BAR).is_empty(), "releasing the thumb lets the fitted bar disappear");
}
+1 -1
View File
@@ -223,7 +223,7 @@ fn edge_to_edge_fitting_fills_within_the_scoped_zoom_room_and_preserves_editor_f
},
);
});
fixture.ctx().set_pixels_per_point(ppp);
fixture.pixels_per_point(ppp);
fixture.room(room.size()).settle();
let initial = view.get();
assert!(zoom::device(&initial, ppp) <= scheme.max_device(), "initial fitting stays inside the scope's ceiling");
+1 -1
View File
@@ -26,7 +26,7 @@ fn any_focus_includes_framework_and_foreign_widgets() {
let observed = Cell::new(false);
let mut text = String::new();
let mut show = |ui: &mut Ui| {
let response = Probe::new(&seen).sense(Sense::CLICK | Sense::FOCUS).id_salt("control").show(ui);
let response = Probe::new(&seen).sense(Sense::CLICK | Sense::FOCUS | Sense::TAKE_FOCUS).id_salt("control").show(ui);
control.set(response.rect);
let field = ui.add(egui::TextEdit::singleline(&mut text));
foreign.set(field.rect);
+1 -1
View File
@@ -257,7 +257,7 @@ fn context_free_notices_wait_for_show_and_use_the_silenced_keys_at_delivery() {
ui.ctx().request_discard("deliver notices across two layout passes");
}
});
fixture.room(Vec2::new(800.0, 600.0)).settle();
fixture.room(Vec2::new(800.0, 600.0)).motion(craft_behavior::MotionMode::Off).settle();
let delivered = "Background export complete";
let suppressed = "Background format reminder";