mirror of
https://github.com/mpv-player/mpv
synced 2024-12-27 09:32:40 +00:00
osc: use video margins only if OSC is visible
Looks awkward otherwise. This means that even if boxvideo is enabled, nothing gets "boxed" if the OSC is set to auto-hide.
This commit is contained in:
parent
6bf1a83057
commit
b899504862
@ -2051,6 +2051,11 @@ end
|
||||
function update_margins()
|
||||
local margins = osc_param.video_margins
|
||||
|
||||
-- Don't use margins if it's visible only temporarily.
|
||||
if (not state.osc_visible) or (get_hidetimeout() >= 0) then
|
||||
margins = {l = 0, r = 0, t = 0, b = 0}
|
||||
end
|
||||
|
||||
if user_opts.boxvideo then
|
||||
-- check whether any margin option has a non-default value
|
||||
local margins_used = false
|
||||
@ -2076,12 +2081,6 @@ function update_margins()
|
||||
reset_margins()
|
||||
end
|
||||
|
||||
-- Don't report margins if it's visible only temporarily. At least for
|
||||
-- console.lua this makes no sense.
|
||||
if (not state.osc_visible) or (get_hidetimeout() >= 0) then
|
||||
margins = {l = 0, r = 0, t = 0, b = 0}
|
||||
end
|
||||
|
||||
utils.shared_script_property_set("osc-margins",
|
||||
string.format("%f,%f,%f,%f", margins.l, margins.r, margins.t, margins.b))
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user