diff options
| author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2026-01-09 13:04:36 -0800 |
|---|---|---|
| committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2026-01-09 13:04:36 -0800 |
| commit | 7428ae5098fdbd351fa3c9c470699ce71dd3b9a5 (patch) | |
| tree | 701a93fcad5eee4f387dae80865883cdfa8155ed /osd.lua | |
| parent | 765958208afde583447f97063779a308af678109 (diff) | |
| download | mpv-iptv-menu-7428ae5098fdbd351fa3c9c470699ce71dd3b9a5.tar.gz mpv-iptv-menu-7428ae5098fdbd351fa3c9c470699ce71dd3b9a5.tar.xz | |
avoid image redraws when minimal space remains
Diffstat (limited to 'osd.lua')
| -rw-r--r-- | osd.lua | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -278,9 +278,9 @@ function mt:set_img(path, menu_res) -- line is. if it were possible to place images *under* text, maybe -- we'd allow overlap, but mpv currently hard-codes this order. local min_h = math.floor(3 * fs) - local max_h = math.floor(math.min( + local max_h = math.floor(math.max(min_h, math.min( self.height - 2*padding, - (self.width - start - 2*padding) * 3/2)) + (self.width - start - 2*padding) * 3/2))) local max_w = math.floor(max_h * 2/3) local top = math.floor(padding) local right = math.floor(self.width - padding) |
