Originally Posted by Gethe
This is a general issue with single pixel lines. As the tooltip moves, the border will occasionally get between pixels which results in that line becoming dimmer.
One way you can work around this is ensuring that 1) both the width and height are whole numbers and 2) the frame is positioned on whole pixels. Using floor() and/or ceil() can help in both cases.
Also, if you're not anchoring corner to corner, you may need to add .5.
|
By corner to corner, do you mean e.g. anchoring to top left of UIParent?
I tried applying this:
Lua Code:
local function EditorStopMoveSize()
Editor:StopMovingOrSizing()
if Editor.isSizing then
local width, height = Editor:GetSize()
Editor:SetSize(ceil(width), ceil(height))
elseif Editor.isMoving then
local point, _, _, x, y = Editor:GetPoint()
Editor:SetPoint(point, ceil(x), ceil(y))
end
Editor.isSizing = false
Editor.isMoving = false
end
However, the problem remains. Adding .5 at the end of each calculation doesn't do the trick either.
Originally Posted by ObbleYeah
I've used
Lua Code:
UIParent:GetScale()/frame:GetEffectiveScale()
to fix borders with this issue on corner to corner offsets
|
Could you elaborate? This always returns 1 for me when fed with the frame I want to correct.