Repository navigation
fix: fade the seek bar's time out where it was shown - #576
Merged
Merged
Conversation
The hover's position and second reset to 0 in the same change that hid the seek time tooltip, so under Breeze it faded out at the bar's start, and could read 0:00. They now keep their last values while hidden, and the tooltip's anchor and text take their source from the gesture's and the hover's own state, so a touch drag's time fades beside the playhead and a track without a known length leaves the last time. Closes #574
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.
Closes #574.
What changes
When the pointer left the seek bar, its hover position and second reset to 0 in the same change that hid the time tooltip. Under Breeze the tooltip fades out, so it faded at the bar's start, the 0:00 position, and could read 0:00.
hoverXandhoverSecondkeep their last values while hidden (Binding … when: hoverTimeShown,RestoreNone), so the tooltip fades out where it was, with its time. Hidden, nothing follows the pointer or playback, so no hidden change draws frames.to: 1.0).hoverSecondkeeps the last second then, rather than recomputing against that range beforehoverTimeShownhas caught up, which latched 0:00.gestureHeld(), whichadjustingnow uses too, andseekHover.hovered. They don't wait onshown/adjusting, which can still hold their old values within the same change. With neither a gesture nor a hover, the anchor stays where it was. So a touch drag, which has no hover, fades out beside the playhead with its time, instead of jumping to the last hover position (or 0).seekHoverLinestill readshoverX. It's hidden whenever the held value would differ, and fix: show the seek bar's playhead for very short tracks #552's short-track handling is unchanged (any length > 0 counts as known).Tests
AccessibilityTest::seekTimeFadesOutWhereItWasruns in the app's own style (org.kde.desktop), whose ToolTip has an exit transition. On every frame of each fade-out it checks that the box's x and text stay as shown, and it uses signal spies to catch even changes that no frame draws. Cases:seekAllowedfalse) while hovering fades in place, and Playing shows it againWithout the fix, the test fails at the first leave: the box moves to x = -18, the 0:00 position, for the whole fade. With only the hover hold, the unknown-length case still latches 0:00, and the touch case changes its text.
./scripts/run-tests.sh --ui-only: 104/104 passed.Not covered here
A mouse drag that is released off the bar still fades out at the hover point from before the drag, with that point's time. Qt doesn't update
HoverHandlerduring a grab, and leaves it stale until the frame after the release. So at the release the hover still counts as on the bar, and its stale point takes over before the next frame hides it. This was already the case before this PR, only at x = 0. It needs a fresh hover state after a gesture, so I left it as a possible follow-up.