summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorJan Janssen <medhefgo@web.de>2019-10-29 13:34:15 +0100
committerwm4 <1387750+wm4@users.noreply.github.com>2019-10-29 17:09:26 +0100
commitb27836011e26f04ec51645e41ac31b84d3d593da (patch)
tree0e7df6b8b47651d5c3bc39e7777d5149ad0457ea /player
parentafe3a5a0104a78892d45b53c9443f98c232476b7 (diff)
downloadmpv-b27836011e26f04ec51645e41ac31b84d3d593da.tar.bz2
mpv-b27836011e26f04ec51645e41ac31b84d3d593da.tar.xz
osc: calculate osc_geo position after aspect correction
Fixes #7098
Diffstat (limited to 'player')
-rw-r--r--player/lua/osc.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index 2d9e7be5a0..35abf20ae2 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -1253,13 +1253,11 @@ layouts["slimbox"] = function ()
end
function bar_layout(direction)
- local y_offset = (direction < 0) and osc_param.playresy or 0
-
local osc_geo = {
x = -2,
- y = y_offset + direction * (54 + user_opts.barmargin),
+ y,
an = (direction < 0) and 7 or 1,
- w = osc_param.playresx + 4,
+ w,
h = 56,
}
@@ -1273,8 +1271,12 @@ function bar_layout(direction)
if ((osc_param.display_aspect > 0) and (osc_param.playresx < minW)) then
osc_param.playresy = minW / osc_param.display_aspect
osc_param.playresx = osc_param.playresy * osc_param.display_aspect
- osc_geo.y = y_offset + direction * (54 + user_opts.barmargin)
- osc_geo.w = osc_param.playresx + 4
+ end
+
+ osc_geo.y = direction * (54 + user_opts.barmargin)
+ osc_geo.w = osc_param.playresx + 4
+ if direction < 0 then
+ osc_geo.y = osc_geo.y + osc_param.playresy
end
local line1 = osc_geo.y - direction * (9 + padY)