0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00

osc: fix display of chapters and playlist scaling

Compensate \fs when using non-default scale(fullscreen|windowed).
This commit is contained in:
Ricardo Constantino 2016-10-09 00:52:32 +01:00
parent 2a99e7ae12
commit 06065dc5ef
No known key found for this signature in database
GPG Key ID: EFD16019AE4FF531

View File

@ -673,9 +673,18 @@ function show_message(text, duration)
text = string.gsub(text, "%.", ".\226\128\139")
text = string.gsub(text, "_", "_\226\128\139")
local scale = 1
if (mp.get_property("video") == "no") then
scale = user_opts.scaleforcedwindow
elseif state.fullscreen then
scale = user_opts.scalefullscreen
else
scale = user_opts.scalewindowed
end
-- scale the fontsize for longer multi-line output
local fontsize = tonumber(mp.get_property("options/osd-font-size"))
local outline = tonumber(mp.get_property("options/osd-border-size"))
local fontsize = tonumber(mp.get_property("options/osd-font-size")) / scale
local outline = tonumber(mp.get_property("options/osd-border-size")) / scale
if lines > 12 then
fontsize, outline = fontsize / 2, outline / 1.5