Consistant scrolling direction

Scrolling up to change a value is semantically associated with
increasing that value.
Volume already worked this way, and the same is true for seeking
by scrolling outside of the UI, but scrolling up on the timeline
seeked backwards and scrolling up on the speed widget reduced speed.
Now scrolling on the timeline or outside of the UI seeks in the same
direction and speed also increases when scrolling up on the widget.
This commit is contained in:
Christoph Heinrich
2022-07-10 14:53:59 +02:00
committed by Tomas Klaen
parent b1c0466c11
commit 35f058d760

View File

@@ -2400,10 +2400,10 @@ elements:add('timeline', Element.new({
if this.pressed then this:set_from_cursor() end
end,
on_wheel_up = function(this)
mp.commandv('seek', -options.timeline_step)
mp.commandv('seek', options.timeline_step)
end,
on_wheel_down = function(this)
mp.commandv('seek', options.timeline_step)
mp.commandv('seek', -options.timeline_step)
end,
render = render_timeline,
}))
@@ -2674,10 +2674,10 @@ if options.speed then
request_render()
end,
on_wheel_up = function(this)
mp.set_property_native('speed', state.speed - options.speed_step)
mp.set_property_native('speed', state.speed + options.speed_step)
end,
on_wheel_down = function(this)
mp.set_property_native('speed', state.speed + options.speed_step)
mp.set_property_native('speed', state.speed - options.speed_step)
end,
render = render_speed,
}))