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 force_seek_tooltip option #338

Merged
merged 7 commits into from
Feb 4, 2025
Merged

Conversation

Samillion
Copy link
Owner

@Samillion Samillion commented Feb 1, 2025

Fixes: #306

Force show seekbar tooltip (ie: thumbnail) on mouse drag, even if not hovering seekbar, while holding down mouse button.

Changes

  • Add force_seek_tooltip option
  • Rename playingWhilstSeeking state to playing_and_seeking
  • Rename persistentprogresstoggle state to persistent_progress_toggle
  • Remove unused state playingWhilstSeekingWaitingForEnd
  • Make playing_and_seeking state independent and not tied to mouse_seek_pause option
  • Fix behavior of mouse_seek_pause option when set to no and mouse drag then release mouse button
    • It used to pause the video on button release, now it doesn't
    • Now it only cycles pause if mouse_seek_pause is set to yes

Usage

# modernz.conf
# enable the option to force seek tooltip
force_seek_tooltip=yes

force show seedkbar tooltip (ie: thumbnail) on mouse drag, even if not hovering seekbar, while holding down mouse button
@Keith94
Copy link
Contributor

Keith94 commented Feb 2, 2025

There's some minor tweaks you could potentially add to this.

  1. Disable tooltips while dragging seekbar: if you're seeking and move cursor down to any button, it makes more sense to hide all button tooltips (since you can't interact while dragging anyway).

  2. Disable hover_effect_for_sliders while seeking: hovering either handle during seekbar drag triggers the hover size effect, despite the hover color effects being disabled on all other buttons.

@Samillion
Copy link
Owner Author

2. Disable hover_effect_for_sliders while seeking: hovering either handle during seekbar drag triggers the hover size effect, despite the hover color effects being disabled on all other buttons.

Could you elaborate? size effect and color effect are different. You said "despite all hover color effects being disabled". Disabling color doesn't affect sliders, as sliders only have size effects applied to them, nothing else.

        -- Apply size hover_effect only if hovering over the handle
        if handle_hovered and user_opts.hover_effect_for_sliders then
            if contains(user_opts.hover_effect, "size") then
                rh = rh * (user_opts.hover_button_size / 100)
            end
        end

@Keith94
Copy link
Contributor

Keith94 commented Feb 3, 2025

My bad, I phrased that poorly. I used the color effects as a comparison, since none of the buttons change color when you're dragging seek handle (which is good)

If the slider is being dragged, mousing over either of the handles probably shouldn't keep increasing the size of it. Perhaps it could have a static size while being dragged. Minor nitpicking 😅

@Samillion
Copy link
Owner Author

My bad, I phrased that poorly.

Not at all, English is not my first language, sometimes my brain scrambles trying to understand simple things xD, my apologies and thank you for the detailed explanation.

I'll try to think of an efficient way to fix the cosmetic issues you pointed out in a later PR. I don't want to rush it with a messy fix.

Generally it shouldn't be difficult at all to handle them, especially that we can now track it more accurately with the playing_and_seeking state.

Please don't hesitate to mention any other issues if found. I'll merge the PR sometime tomorrow, nevertheless, there is no rush in testing.

@Keith94
Copy link
Contributor

Keith94 commented Feb 3, 2025

Okay sounds good to me :D

Please don't hesitate to mention any other issues if found. I'll merge the PR sometime tomorrow, nevertheless, there is no rush in testing.

I only did a basic testing so far but it seemed fine. It affects just the seekbar properly now.

In your PR there's a small typo: "seedkbar"

You may want to mention in the docs that this new option only works properly when bottomhover is disabled.
For example, if bottomhover is turned ON and your mouse leaves the "bottom hover zone" the OSC (and tooltip/thumbnail) will hide anyway, even if the force seek tooltip option is set to yes.

@Samillion
Copy link
Owner Author

Oops, nice catch. Thank you.

@Keith94
Copy link
Contributor

Keith94 commented Feb 3, 2025

No worries

On second thought, it technically does work with bottom hover on or off, but it's a lot more effective with bottom hover off, since your mouse can drift anywhere and still show that info.

I suppose the comment is not needed after all (sorry) haha but up to you :)

@Samillion Samillion merged commit 23b0d4d into main Feb 4, 2025
@Samillion Samillion deleted the dev_force_seek_tooltip_feat branch February 4, 2025 16:02
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.

Always show seekbar tooltip info while dragging
2 participants