Allow the playback pointer to be held off-centre when following - #4
Open
novikov-alexander wants to merge 1 commit into
Open
Conversation
PlaybackScrollContinuous holds the playback pointer at the centre of the view. That is the right place when following playback, but not when following a recording as it is made: everything of interest is behind the pointer, and the half of the view ahead of it is empty. Add a follow anchor, as a fraction of the view width, defaulting to 0.5 so that existing behaviour is unchanged. Near the start, where the anchor would put the centre frame before the beginning of the audio, the view holds still and the pointer travels across to meet it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
PlaybackScrollContinuousholds the playback pointer at the centre of theview. That is the right place when following playback, but not when
following a recording as it is being made: everything of interest is
behind the pointer, and the half of the view ahead of it is empty.
This adds a follow anchor — a fraction of the view width at which the
pointer is held — defaulting to 0.5, so existing behaviour is unchanged
for every current caller.
Near the start of a recording, where the anchor would place the centre
frame before the beginning of the audio, the view holds still and the
pointer travels across to meet it, rather than scrolling into empty
space.
2 files changed, +56 −1. The only behavioural change to existing code is
that
PlaybackScrollContinuousnow routes throughgetCentreFrameForAnchoredPointer(), which returnsm_playPointerFrameunchanged at the default anchor.
Used by Tony to follow a recording as it is made.