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

feat: add more chapter marker styles with nibbles_style #277

Merged
merged 3 commits into from
Dec 29, 2024

Conversation

xiaoleichen
Copy link
Contributor

Two styles:

  • existing triangle style
Screenshot 2024-12-28 at 3 19 09 PM
  • More subtle bar style
Screenshot 2024-12-28 at 3 17 45 PM

Also slider gap should be computed from seekbar background height and seekbar height instead of redefining.

@Keith94
Copy link
Contributor

Keith94 commented Dec 29, 2024

What about making the bars transparent similar to YouTube's player?

Nibbles follow the seekbar color (mentioned in #243) but maybe we can override it.

image

@xiaoleichen
Copy link
Contributor Author

What about making the bars transparent similar to YouTube's player?

Nibbles follow the seekbar color (mentioned in #243) but maybe we can override it.

I don't think setting nibbles transparent will be able to break down the seekbar as Youtube does. Maybe setting a different color from the seekbar would make it feel like so. Alternatively we can draw seekbar itself in segments, which doesn't feel very straightforward to implement.

@Samillion
Copy link
Owner

Beautiful work, thank you very much. Though if I may, I have an input I'd like to share. To be exact, I 100% know that mpv users will request this adjustment.

The rectangle marker splits through the seek bar, as it is drawn as one element. Why not follow the triangle nibbles way and make it top/bottom thin squares or rectangles?

This would:

  • Ensure consistent user experience and future maintenance
  • Be compatible with current user options (nibbles_top, nibbles_bottom)

@xiaoleichen
Copy link
Contributor Author

The rectangle marker splits through the seek bar, as it is drawn as one element. Why not follow the triangle nibbles way and make it top/bottom thin squares or rectangles?

That was how I initially did it, but I didn't really like it. I thought since the width of the markers is vertically consistent now, I like it better to cut through the seekbar.

This is the initial implementation as you suggested:
Screenshot 2024-12-29 at 12 01 36 AM

Also current implementation doesn't draw the bar as one element. It still draws top and down nibbles separately, and both bars extend through the seekbar to make it look like one. It still supports top or bottom only, though I'll admit it doesn't look as good when showing top / bottom only:
Screenshot 2024-12-29 at 12 21 41 AM

If you think people would prefer the initial implementation with separate top/bottom rectangles, I can revert to it, or make them separate styles. Either way me personally like both of them better than triangles which can be too distracting, especially when there are many chapters in a video.

@Samillion
Copy link
Owner

If you think people would prefer the initial implementation with separate top/bottom rectangles, I can revert to it, or make them separate styles. Either way me personally like both of them better than triangles which can be too distracting, especially when there are many chapters in a video.

It is unfortunately one of the downsides of trying to please everyone. I genuinely agree with you, but over the last 6 years I've seen enough reports from users to know how sometimes even the smallest change can be contested.

A good example on mpv repo itself, it took months and over 90+ comments (and one closed PR), to agree on a font size change for console. I am in no way saying it wasn't a valid discussion, I'm merely pointing out that I know this will be requested at one point or the other.

It is why I generally tend to do personal preference as optional as possible.

In this case, the two nibbles behavior. If you want to keep it strike through, then it needs to be added as a third style option, if that makes sense.

Otherwise, you'll be facing many requests for adjustments, and as we can see in #239 a delay or abandoned status can easily happen.

@xiaoleichen
Copy link
Contributor Author

Makes sense to me!

Added bar and single-bar styles to implement the two styles shown in above screenshots.

@Samillion Samillion changed the title Add support of chapter nibble style feat: add more chapter marker styles with nibbles_style Dec 29, 2024
@Samillion
Copy link
Owner

Absolutely perfect. Thank you very much for your effort and open mind in regards to the adjustments.

Will merge now.

I can already feel the feature request being made "make it so we can control nibbles color!" 😆

@Samillion Samillion merged commit f7b6d50 into Samillion:main Dec 29, 2024
@xiaoleichen xiaoleichen deleted the chapter_nibbles_style_feat branch December 29, 2024 10:34
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.

3 participants