Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Waveform Seekbar time indication (#2419) #2550

Merged
merged 13 commits into from Sep 10, 2017

Conversation

Muges
Copy link
Contributor

@Muges Muges commented Sep 1, 2017

This pull request fixes issue #2419:

  • It adds a soundcloud-like visual effect when the mouse hovers the waveform seekbar, and shows the time pointed by the mouse instead of the current position.
    peek 01-09-2017 20-17
  • It allows to seek by dragging (pressing the mouse button, moving it, then releasing it), in the same way as a Gtk.Scale.

Here is what it looks like with various popular gtk themes (from top to bottom: Adwaita-dark, Adwaita, Arc-Dark, Arc, Ambiance, Radiance):

waveformseekbar-hover

As you can see the default "hover color" (the one to the left of the mouse cursor in the screenshots above) is not always great. It is computed by blending the two other colors, and I could not find any other way that works well for all the themes I tested. I hope it's good enough, considering that the three colors used in the waveform are configurable in the plugin's options. If not, I could remove the visual effect, and only change the time labels when hovering.

@declension
Copy link
Member

Hmm, I can't get it to work as intended here (with Ubuntu 17.04 + HiDPI). The hovering seems to un-highlight the played section when going back in time but not at all when going forwards, and can't ever go further than half way.

It can also result in highlighting that looks like dark-light-dark-none (screenshots force a redraw which fixes this issue, though, so can't show this)

@Muges
Copy link
Contributor Author

Muges commented Sep 3, 2017

I did not take into account the gtk scale factor for HiDPI displays. This should be fixed.

@ptitjes
Copy link
Collaborator

ptitjes commented Sep 5, 2017

I did not test it yet, but the code looks good to me.

@declension
Copy link
Member

@Muges thanks that fixes the DPI bugs.

Generally looks great to me. The only thing is the colours: I find it confusing that if you:

  • hover to the left (before) the current position, a light colour means currently played, dark means (tentative) new position.
  • hover to the right (after), dark means currently played, light means (tentative) new position

Perhaps the whole bar should be lighter on dragging (yes - this means you can't see the current position I guess, but it feels less strange than colours swapping meaning IMO)

@Muges
Copy link
Contributor Author

Muges commented Sep 6, 2017

The last commits I pushed makes the whole bar lighter as suggested, and shows the current position with a vertical line. It looks like this:
peek 06-09-2017 20-55

If you prefer I can remove the vertical line.

@declension
Copy link
Member

@Muges good work - I think it's much clearer now. Personally I think it looks nicer without the line at all, but if other people feel strongly that's fine

@Muges
Copy link
Contributor Author

Muges commented Sep 9, 2017

Personally I think it looks nicer without the line at all, but if other people feel strongly that's fine

Okay, I removed it. I think I liked it a bit better with a cursor to show the current position, but it's fine either way.

@declension
Copy link
Member

Thanks @Muges. Perhaps this could be an prefs option then longer term.

Seems good to get this merged now (I'll then rebase the patch for #2470 if I get some time).

@declension declension merged commit 8389e65 into quodlibet:master Sep 10, 2017
@Meriipu
Copy link
Contributor

Meriipu commented Oct 30, 2017

So if I understand this it is intended that hovering the waveform seekbar while a track is playing will hide the current position in the track and only show where you would seek to?

I miss having the current position show even when hovering

(I really like how it looks in the images in the first post)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants