1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-22 19:34:14 +00:00

console: don't overwrite color and alpha of osd-back-color

This commit is contained in:
Christoph Heinrich 2023-05-01 01:42:02 +02:00 committed by Dudemanguy
parent d470766000
commit 2406a89e00

View File

@ -279,9 +279,10 @@ function update()
local clipping_coordinates = '0,' .. coordinate_top .. ',' ..
screenx .. ',' .. screeny
local ass = assdraw.ass_new()
local has_shadow = mp.get_property('osd-back-color'):sub(2, 3) == '00'
local style = '{\\r' ..
'\\1a&H00&\\3a&H00&\\4a&H99&' ..
'\\1c&Heeeeee&\\3c&H111111&\\4c&H000000&' ..
'\\1a&H00&\\3a&H00&\\1c&Heeeeee&\\3c&H111111&' ..
(has_shadow and '\\4a&H99&\\4c&H000000&' or '') ..
'\\fn' .. opts.font .. '\\fs' .. opts.font_size ..
'\\bord' .. opts.border_size .. '\\xshad0\\yshad1\\fsp0\\q1' ..
'\\clip(' .. clipping_coordinates .. ')}'