mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
Compare the Perspective Crop test label as a string slice
This commit is contained in:
1 parent
57fe803772
commit
7be57ed193
1 file changed
+3
-10
@@ -24,10 +24,8 @@ fn hover(h: &mut App, pos: Pos2) {
|
||||
|
||||
/// The entire quad is one of the interactive parts declared only when the frame, grid and handles are shown.
|
||||
fn quad_centres(h: &App) -> Vec<Pos2> {
|
||||
h.query_all_by_role(Role::Button)
|
||||
.filter(|node| node.accesskit_node().label() == Some("Whole perspective crop"))
|
||||
.map(|node| node.rect().center())
|
||||
.collect()
|
||||
let quads = h.query_all_by_role(Role::Button).filter(|node| node.accesskit_node().label().as_deref() == Some("Whole perspective crop"));
|
||||
quads.map(|node| node.rect().center()).collect()
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -87,12 +85,7 @@ fn a_second_view_of_the_same_document_has_no_perspective_crop_quad() -> Result<(
|
||||
let primary = CanvasHost::main(0);
|
||||
let secondary = CanvasHost { idx: 0, window: Some(window) };
|
||||
app.ui.tool = Tool::PerspectiveCrop;
|
||||
app.canvas_tools.perspective.tool.set(Some([
|
||||
Point::new(110.0, 90.0),
|
||||
Point::new(285.0, 90.0),
|
||||
Point::new(285.0, 217.0),
|
||||
Point::new(110.0, 217.0),
|
||||
]));
|
||||
app.canvas_tools.perspective.tool.set(Some([Point::new(110.0, 90.0), Point::new(285.0, 90.0), Point::new(285.0, 217.0), Point::new(110.0, 217.0)]));
|
||||
|
||||
let own = Rect::from_min_size(pos2(20.0, 20.0), vec2(440.0, 340.0));
|
||||
let copy = own.translate(vec2(480.0, 0.0));
|
||||
|
||||
Reference in new issue
Block a user