From 7428ae5098fdbd351fa3c9c470699ce71dd3b9a5 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Fri, 9 Jan 2026 13:04:36 -0800 Subject: avoid image redraws when minimal space remains --- osd.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osd.lua b/osd.lua index 7f44f60..f9d4078 100644 --- a/osd.lua +++ b/osd.lua @@ -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) -- cgit v1.2.3-70-g09d2