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