From b27836011e26f04ec51645e41ac31b84d3d593da Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Tue, 29 Oct 2019 13:34:15 +0100 Subject: osc: calculate osc_geo position after aspect correction Fixes #7098 --- player/lua/osc.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'player') 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) -- cgit v1.2.3