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.
Unified · Split
| @@ -561,11 +561,12 @@ local function update() · 560 unmodified lines | |||
| 561 | -- of the drawing. So the cursor doesn't affect layout too much, make it as | 561 | -- of the drawing. So the cursor doesn't affect layout too much, make it as |
| 562 | -- thin as possible and make it appear to be 1px wide by giving it 0.5px | 562 | -- thin as possible and make it appear to be 1px wide by giving it 0.5px |
| 563 | -- horizontal borders. | 563 | -- horizontal borders. |
| 564 | local color, alpha = mpv_color_to_ass(mp.get_property('osd-color')) | ||
| 564 | local cheight = opts.font_size * 8 | 565 | local cheight = opts.font_size * 8 |
| 565 | local cglyph = '{\\rDefault' .. | 566 | local cglyph = '{\\rDefault' .. |
| 566 | (mp.get_property_native('focused') == false | 567 | (mp.get_property_native('focused') == false |
| 567 | and '\\alpha&HFF&' or '\\1a&H44&\\3a&H44&') .. | 568 | and '\\alpha&HFF&' or '\\1a&H44&\\3a&H' .. alpha .. '&') .. |
| 568 | '\\1c&Heeeeee&\\3c&Heeeeee&' .. | 569 | '\\1c&Heeeeee&\\3c&H' .. color .. '&' .. |
| 569 | '\\xbord0.5\\ybord0\\xshad0\\yshad1\\p4\\pbo24}' .. | 570 | '\\xbord0.5\\ybord0\\xshad0\\yshad1\\p4\\pbo24}' .. |
| 570 | 'm 0 0 l 1 0 l 1 ' .. cheight .. ' l 0 ' .. cheight .. | 571 | 'm 0 0 l 1 0 l 1 ' .. cheight .. ' l 0 ' .. cheight .. |
| 571 | '{\\p0}' | 572 | '{\\p0}' |