1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 08:12:17 +00:00

osc: extend hitbox of seekbars to include gap

should make usage a bit easy

Fixes #810
This commit is contained in:
ChrisK2 2014-05-27 22:52:34 +02:00
parent baaa32621e
commit 518e0b7320

View File

@ -296,7 +296,7 @@ function register_element(type, x, y, an, w, h, style, content, eventresponder,
local hitbox
if type == "slider" then
-- if it's a slider, cut the border and gap off, as those aren't of interest for eventhandling
local fill_offset = metainfo.slider.border + metainfo.slider.gap
local fill_offset = metainfo.slider.border
hitbox = {x1 = bX1 + fill_offset, y1 = bY1 + fill_offset, x2 = bX2 - fill_offset, y2 = bY2 - fill_offset}
else
hitbox = {x1 = bX1, y1 = bY1, x2 = bX2, y2 = bY2}