console.lua: inherit --osd-color in the cursor
Following up 19537a4996, also respect the user-specified color in the
cursor. But the cursor is drawn as a border, so we actually need to use
--osd-color as the border color.
This commit is contained in:
1 parent
4e8452aee8
commit
2ecbe8d83b
1 file changed
+3
-2
@@ -561,11 +561,12 @@ local function update()
|
||||
-- of the drawing. So the cursor doesn't affect layout too much, make it as
|
||||
-- thin as possible and make it appear to be 1px wide by giving it 0.5px
|
||||
-- horizontal borders.
|
||||
local color, alpha = mpv_color_to_ass(mp.get_property('osd-color'))
|
||||
local cheight = opts.font_size * 8
|
||||
local cglyph = '{\\rDefault' ..
|
||||
(mp.get_property_native('focused') == false
|
||||
and '\\alpha&HFF&' or '\\1a&H44&\\3a&H44&') ..
|
||||
'\\1c&Heeeeee&\\3c&Heeeeee&' ..
|
||||
and '\\alpha&HFF&' or '\\1a&H44&\\3a&H' .. alpha .. '&') ..
|
||||
'\\1c&Heeeeee&\\3c&H' .. color .. '&' ..
|
||||
'\\xbord0.5\\ybord0\\xshad0\\yshad1\\p4\\pbo24}' ..
|
||||
'm 0 0 l 1 0 l 1 ' .. cheight .. ' l 0 ' .. cheight ..
|
||||
'{\\p0}'
|
||||
|
||||
Reference in new issue
Block a user