forge
Explore
Log in

Don't you dare go Hollow

Shrink dissolve hit target

Browse files at this commit

d15f888c5fff4762b3e555a8635ba8349f9e6975Ahmet Kaan GümüşParent: 9a27ee6
  • fix
    • shrink dissolve hit target
Show full message
🐛 fix(app): shrink dissolve hit target
crates/app/src/tests/layout.rsmodified+22 -0
@@ -2688,6 +2688,28 @@ fn darkroom_bench_wires_transition_controls_and_lane_drop_cue() {
2688 "the Darkroom clip lost its transition affordance: {needle}"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 let lane = &bench[bench.find("fn lane_row(").expect("the lane renderer")2714 let lane = &bench[bench.find("fn lane_row(").expect("the lane renderer")
2693 ..bench2715 ..bench
crates/app/src/ui/bench_stance.rsmodified+2 -5
@@ -496,11 +496,8 @@ fn clip_box(
496 .absolute()496 .absolute()
497 .right_0()497 .right_0()
498 .top_0()498 .top_0()
499- .h_full()499+ .w(px(FADE_HANDLE_W))
500- .w(px(scale500+ .h(px(FADE_HANDLE_H))
501- .width_px(f64::from(clip.transition_out) / player.fps)
502- .min(width)))
503- .occlude()
504 .cursor_pointer()501 .cursor_pointer()
505 .tooltip(move |_, cx| cx.new(|_| Tip(dissolve_tip.clone())).into())502 .tooltip(move |_, cx| cx.new(|_| Tip(dissolve_tip.clone())).into())
506 .on_click(cx.listener(move |this, _, _, cx| {503 .on_click(cx.listener(move |this, _, _, cx| {