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: disable previewing while dragging the timeline #358

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/uosc_shared/elements/Timeline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ function Timeline:on_prop_fullormaxed() self:update_dimensions() end
function Timeline:on_display() self:update_dimensions() end
function Timeline:on_mouse_leave() self:clear_thumbnail() end
function Timeline:on_global_mbtn_left_up()
if thumbnail.disabled then thumbnail.disabled = false end
if self.pressed then
mp.set_property_native('pause', self.pressed_pause)
self.pressed = false
Expand All @@ -114,6 +115,8 @@ Timeline.seek_timer = mp.add_timeout(0.05, function() Elements.timeline:set_from
Timeline.seek_timer:kill()
function Timeline:on_global_mouse_move()
if self.pressed then
thumbnail.disabled = true
self:clear_thumbnail()
if self.width / state.duration < 10 then
self:set_from_cursor(true)
self.seek_timer:kill()
Expand Down