fix: border in thumbnail decoration calculation was already scaled (#242)

This commit is contained in:
christoph-heinrich
2022-09-22 22:16:38 +02:00
committed by GitHub
parent bbe32ba65a
commit 36cd31e23b

View File

@@ -2925,8 +2925,8 @@ function Timeline:render()
display.width * scale - thumbnail.width - thumb_x_margin
))
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 bx, by = (thumb_x + border + thumbnail.width) / scale, (thumb_y + border + thumbnail.height) / scale
local ax, ay = thumb_x / scale - border, thumb_y / scale - border
local bx, by = (thumb_x + thumbnail.width) / scale + border, (thumb_y + thumbnail.height) / scale + border
ass:rect(ax, ay, bx, by, {
color = options.foreground, border = 1, border_color = options.background, radius = 3, opacity = 0.8,
})