feat(timeline): the playhead can follow a trimmed edge, so the monitor shows the frame the cut lands on - #194
Merged
Merged
Conversation
…r shows the frame the cut lands on A tray toggle beside the hand tool. With it on, dragging a clip's head puts the playhead on the new first frame, and dragging its tail puts it one frame inside the new end. A magnetic head trim takes the playhead with the clip when it slides back on release. Off by default, remembered as trimFollow. Signed-off-by: Raphael Bernardo <6786682+raphaelbgr@users.noreply.github.com>
Signed-off-by: Raphael Bernardo <6786682+raphaelbgr@users.noreply.github.com>
Owner
|
Awesome work. Your contributions are appreciated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new toggle in the timeline tray, right after the hand (pan) tool: Player follows the resize.
With it on, dragging a clip's edge moves the playhead along with the edge, so the monitor shows the exact frame the cut will land on while you are still dragging. Instagram Edits and CapCut work the same way, and it makes trimming to a precise frame much faster than trim, scrub, trim again.
Behaviour
trimFollow, the same waymagneticis.The monitor already draws from the echo during a gesture, so no rendering changes were needed. The change is a
seekin theGesture::Trimbranch ofclip_dragged, plus one more inclip_releasedfor the magnetic case.Changes
prefs.rs:trim_follow: bool(serde default, so older settings files load unchanged)studio.rs: the seeks described above, andset_trim_followpushed to the window next toset_magneticpanes/timeline.rs,lib.rs:TrimFollowChangedmessage and callback, wired like the magnetic toggleeditor.slint,seat.slint,timeline-pane.slint,tray.slint: property and callback plumbing, and the tray buttonicons.slint: a newtrim-followglyph (a playhead with an arrow on each side)scripts/locales.py. Translated into all 13 shipped languages, reusing each file's existing word for trimming (the one its Magnetic timeline tooltip already uses).Checks
Run on Windows 11 x86_64 (MSVC, FFmpeg 8.1):
Also built and launched on top of the 0.2.3 release.