Nameplates are children of WorldFrame, not UIParent. So they're not affected by UIScale. Scaling WorldFrame or every nameplate is not an option also - it affects the position of frame. One way to "normalize" all sizes to be pixel-perfect looks like this:
Code:
local fix = 1
if(IsLoggedIn()) then -- in case we are back from /reload and not actually logging
fix = GetCVar"UIScale"
else
local fixframe = CreateFrame"Frame"
fixframe:RegisterEvent"PLAYER_LOGIN"
fixframe:SetScript("OnEvent", function()
fix = GetCVar"UIScale"
end)
end
So setting a size, position or offset will look like:
Code:
border:SetPoint("TOPLEFT", -1 * fix, 1 * fix)