Repository navigation
fix(voice): keep the track centred while the speed label is shown - #16
Merged
Merged
Conversation
The speed control sits under the time, so the column grew downwards when playback started and pushed the track and the time up: the pause button stayed centred while the line it belongs to drifted towards the top. Reserving the same height above the track as the speed line below it puts the track's centre back on the play button's centre.
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.
The speed control sits under the time label, so when playback started the column grew downwards and the track plus time were pushed to the top of the bubble — the pause button stayed centred, the line it belongs to did not.
The track now gets the same 16px of room above it as the speed line takes below it, so its centre lands on the play/pause button's centre. The bubble is 32px taller while playing (it already grew by 14px before).
Alternative if you prefer a constant bubble height: put the speed inline after the time instead of on its own line — say the word and I will switch it.
Verification:
flutter analyze --no-fatal-infosclean,flutter test152/152, hot reloaded into the running debug build. The idle player measures centred (slider centre 644 = button centre 644); the playing state could not be measured live because playback did not start from a toolkit tap.