fix: border in thumbnail decoration calculation was already scaled (#242)
This commit is contained in:

committed by
GitHub

parent
bbe32ba65a
commit
36cd31e23b
@@ -2925,8 +2925,8 @@ function Timeline:render()
|
|||||||
display.width * scale - thumbnail.width - thumb_x_margin
|
display.width * scale - thumbnail.width - thumb_x_margin
|
||||||
))
|
))
|
||||||
local thumb_y = round(tooltip_anchor.ay * scale - thumb_y_margin - thumbnail.height)
|
local thumb_y = round(tooltip_anchor.ay * scale - thumb_y_margin - thumbnail.height)
|
||||||
local ax, ay = (thumb_x - border) / scale, (thumb_y - border) / scale
|
local ax, ay = thumb_x / scale - border, thumb_y / scale - border
|
||||||
local bx, by = (thumb_x + border + thumbnail.width) / scale, (thumb_y + border + thumbnail.height) / scale
|
local bx, by = (thumb_x + thumbnail.width) / scale + border, (thumb_y + thumbnail.height) / scale + border
|
||||||
ass:rect(ax, ay, bx, by, {
|
ass:rect(ax, ay, bx, by, {
|
||||||
color = options.foreground, border = 1, border_color = options.background, radius = 3, opacity = 0.8,
|
color = options.foreground, border = 1, border_color = options.background, radius = 3, opacity = 0.8,
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user