History

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.

Guido Cella committed 1 year ago

Commit 2ecbe8d1 parent 4e8452a1 file · +3 −2Browse files

Unified · Split

player/lua/console.lua+3−2
@@ -561,11 +561,12 @@ local function update() · 560 unmodified lines
561561 -- of the drawing. So the cursor doesn't affect layout too much, make it as
562562 -- thin as possible and make it appear to be 1px wide by giving it 0.5px
563563 -- horizontal borders.
564+ local color, alpha = mpv_color_to_ass(mp.get_property('osd-color'))
564565 local cheight = opts.font_size * 8
565566 local cglyph = '{\\rDefault' ..
566567 (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 .. '&' ..
569570 '\\xbord0.5\\ybord0\\xshad0\\yshad1\\p4\\pbo24}' ..
570571 'm 0 0 l 1 0 l 1 ' .. cheight .. ' l 0 ' .. cheight ..
571572 '{\\p0}'

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t