1
mirror of https://github.com/mpv-player/mpv synced 2024-08-04 14:59:58 +02:00

osc: make transparency of background-box configurable

see boxalpha option
This commit is contained in:
ChrisK2 2013-10-18 00:32:07 +02:00
parent 4a4d2155d8
commit 6e34322dec
2 changed files with 8 additions and 3 deletions

View File

@ -6,7 +6,7 @@ offer basic mouse-controllability. It is intended to make interaction easier
for new users and to enable precise and direct seeking.
The OSC is enabled by default if mpv was compiled with lua support. It can be
disabled using ``--osc=no``.
disabled entirely using the ``--osc=no`` option.
Using the OSC
-------------
@ -176,6 +176,10 @@ Configurable parameters
| Default: 0
| Horizontal alignment, -1 (left) to 1 (right)
``boxalpha``
| Default: 80
| Alpha of the background box, 0 (opaque) to 255 (fully transparent)
``hidetimeout``
| Default: 500
| Duration in ms until the OSC hides if no mouse movement, negative value

View File

@ -18,6 +18,7 @@ local user_opts = {
vidscale = true, -- scale the controller with the video?
valign = 0.8, -- vertical alignment, -1 (top) to 1 (bottom)
halign = 0, -- horizontal alignment, -1 (left) to 1 (right)
boxalpha = 80, -- alpha of the background box, 0 (opaque) to 255 (fully transparent)
hidetimeout = 500, -- duration in ms until the OSC hides if no mouse movement, negative value disables autohide
fadeduration = 200, -- duration of fade out in ms, 0 = no fade
deadzonesize = 0, -- size of deadzone
@ -675,8 +676,8 @@ function osc_init()
--
local metainfo = {}
metainfo.alpha1 = 80
metainfo.alpha3 = 80
metainfo.alpha1 = user_opts.boxalpha
metainfo.alpha3 = user_opts.boxalpha
register_box(posX, posY, 5, osc_w, osc_h, osc_r, osc_styles.box, metainfo)
--