Interesting trick! Thank you Kanegasi.
I tried this, but the result is sometime not very accurate:
Code:
-- params
local borderColor = {1, 1, 1}
local borderWidth = 1
--
if (not frame.SetBackdrop) then Mixin(frame, BackdropTemplateMixin) end
frame.backdrop = {
edgeFile = "Interface\\Buttons\\WHITE8x8",
tileEdge = false,
edgeSize = borderWidth,
insets = {left = borderWidth, right = borderWidth, top = borderWidth, bottom = borderWidth},
}
frame:SetBackdrop(frame.backdrop)
frame:SetBackdropBorderColor(borderColor[1], borderColor[2], borderColor[3], 1)