Shrink dissolve hit target
Browse files at this commitd15f888c5fff4762b3e555a8635ba8349f9e6975Parent: 9a27ee6- fix
- shrink dissolve hit target
2 changed files +24 -5
crates/app/src/tests/layout.rsmodified+22 -0
| @@ -2688,6 +2688,28 @@ fn darkroom_bench_wires_transition_controls_and_lane_drop_cue() { | ||
| 2688 | 2688 | "the Darkroom clip lost its transition affordance: {needle}" |
| 2689 | 2689 | ); |
| 2690 | 2690 | } |
| 2691 | + let dissolve = &clip[clip | |
| 2692 | + .find(".when(dissolves, |d| {") | |
| 2693 | + .expect("the dissolve affordance") | |
| 2694 | + ..clip | |
| 2695 | + .find(".when(audio && trims(span)") | |
| 2696 | + .expect("the fade handles")]; | |
| 2697 | + assert!( | |
| 2698 | + dissolve.contains(".w(px(FADE_HANDLE_W))"), | |
| 2699 | + "dissolve click target no longer matches fade-handle width" | |
| 2700 | + ); | |
| 2701 | + assert!( | |
| 2702 | + dissolve.contains(".h(px(FADE_HANDLE_H))"), | |
| 2703 | + "dissolve click target no longer matches fade-handle height" | |
| 2704 | + ); | |
| 2705 | + assert!( | |
| 2706 | + !dissolve.contains("h_full()"), | |
| 2707 | + "dissolve click target still covers the clip body" | |
| 2708 | + ); | |
| 2709 | + assert!( | |
| 2710 | + !dissolve.contains(".w(px(scale"), | |
| 2711 | + "dissolve hit test still tracks transition width" | |
| 2712 | + ); | |
| 2691 | 2713 | |
| 2692 | 2714 | let lane = &bench[bench.find("fn lane_row(").expect("the lane renderer") |
| 2693 | 2715 | ..bench |
crates/app/src/ui/bench_stance.rsmodified+2 -5
| @@ -496,11 +496,8 @@ fn clip_box( | ||
| 496 | 496 | .absolute() |
| 497 | 497 | .right_0() |
| 498 | 498 | .top_0() |
| 499 | - .h_full() | |
| 500 | - .w(px(scale | |
| 501 | - .width_px(f64::from(clip.transition_out) / player.fps) | |
| 502 | - .min(width))) | |
| 503 | - .occlude() | |
| 499 | + .w(px(FADE_HANDLE_W)) | |
| 500 | + .h(px(FADE_HANDLE_H)) | |
| 504 | 501 | .cursor_pointer() |
| 505 | 502 | .tooltip(move |_, cx| cx.new(|_| Tip(dissolve_tip.clone())).into()) |
| 506 | 503 | .on_click(cx.listener(move |this, _, _, cx| { |