summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorRicardo Constantino <wiiaboo@gmail.com>2016-10-09 00:52:32 +0100
committerRicardo Constantino <wiiaboo@gmail.com>2016-10-15 12:27:04 +0100
commit06065dc5efc9c81bcef08063140a83a19460a278 (patch)
tree8910e13f2c7fad879689059caa7b2d777a0f9a54 /player
parent2a99e7ae128209bc22bfb7b6e6fab32cd3d31747 (diff)
downloadmpv-06065dc5efc9c81bcef08063140a83a19460a278.tar.bz2
mpv-06065dc5efc9c81bcef08063140a83a19460a278.tar.xz
osc: fix display of chapters and playlist scaling
Compensate \fs when using non-default scale(fullscreen|windowed).
Diffstat (limited to 'player')
-rw-r--r--player/lua/osc.lua13
1 files changed, 11 insertions, 2 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index c82cace9f1..180dcae27c 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -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