1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-18 04:51:52 +00:00

osc: add scrolling to the seekbar

the osc currently allows for changing volume via scrolling when on top
of the volume icon. this does the same thing for the seekbar by allowing
seeking via scroll.
This commit is contained in:
NRK 2023-08-30 01:18:59 +06:00 committed by sfan5
parent 0652a0b545
commit 022dbfc977
2 changed files with 5 additions and 0 deletions

View File

@ -85,6 +85,7 @@ seekbar
============= ================================================
left-click seek to position
mouse wheel seek forward/backward
============= ================================================
time left

View File

@ -2046,6 +2046,10 @@ function osc_init()
"absolute-percent", "exact") end
ne.eventresponder["reset"] =
function (element) element.state.lastseek = nil end
ne.eventresponder["wheel_up_press"] =
function () mp.commandv("osd-auto", "seek", 10) end
ne.eventresponder["wheel_down_press"] =
function () mp.commandv("osd-auto", "seek", -10) end
-- tc_left (current pos)