mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 12:17:12 +00:00
console.lua: factor OSC margins before the bottom margin
OSC margins are relative to the whole height before subtracting the bottom left margin.
This commit is contained in:
parent
41cff490ad
commit
e1680167fd
@ -276,8 +276,9 @@ local function calculate_max_log_lines()
|
|||||||
select(2, mp.get_property('term-status-msg'):gsub('\\n', ''))
|
select(2, mp.get_property('term-status-msg'):gsub('\\n', ''))
|
||||||
end
|
end
|
||||||
|
|
||||||
return math.floor((select(2, get_scaled_osd_dimensions()) - bottom_left_margin)
|
return math.floor((select(2, get_scaled_osd_dimensions())
|
||||||
* (1 - global_margins.t - global_margins.b)
|
* (1 - global_margins.t - global_margins.b)
|
||||||
|
- bottom_left_margin)
|
||||||
/ opts.font_size
|
/ opts.font_size
|
||||||
-- Subtract 1 for the input line and 0.5 for the empty
|
-- Subtract 1 for the input line and 0.5 for the empty
|
||||||
-- line between the log and the input line.
|
-- line between the log and the input line.
|
||||||
|
Loading…
Reference in New Issue
Block a user