summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChrisK2 <spam@kalania.de>2013-10-18 00:32:07 +0200
committerChrisK2 <spam@kalania.de>2013-10-18 00:33:01 +0200
commit6e34322decea755fe5e6efebabf9d93c473558b6 (patch)
treec23d7dc58ec18d619f456d2fb94895a186031f71
parent4a4d2155d8e76b06380043de73439dc6f80d7d6b (diff)
downloadmpv-6e34322decea755fe5e6efebabf9d93c473558b6.tar.bz2
mpv-6e34322decea755fe5e6efebabf9d93c473558b6.tar.xz
osc: make transparency of background-box configurable
see boxalpha option
-rw-r--r--DOCS/man/en/osc.rst6
-rw-r--r--mpvcore/lua/osc.lua5
2 files changed, 8 insertions, 3 deletions
diff --git a/DOCS/man/en/osc.rst b/DOCS/man/en/osc.rst
index 9a3dc92177..299a6a95e8 100644
--- a/DOCS/man/en/osc.rst
+++ b/DOCS/man/en/osc.rst
@@ -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
diff --git a/mpvcore/lua/osc.lua b/mpvcore/lua/osc.lua
index c724c7737c..8166cd6896 100644
--- a/mpvcore/lua/osc.lua
+++ b/mpvcore/lua/osc.lua
@@ -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)
--