equip-compare: align compare tooltips at the top

This commit is contained in:
shagu
2025-03-18 18:48:19 +01:00
parent 03713ef7e6
commit 51776c3685
+5 -5
View File
@@ -160,14 +160,14 @@ module.enable = function(self)
-- determine screen part
local x = GetCursorPosition() / UIParent:GetEffectiveScale()
local anchor = x < GetScreenWidth() / 2 and "BOTTOMLEFT" or "BOTTOMRIGHT"
local relative = x < GetScreenWidth() / 2 and "BOTTOMRIGHT" or "BOTTOMLEFT"
local anchor = x < GetScreenWidth() / 2 and "TOPLEFT" or "TOPRIGHT"
local relative = x < GetScreenWidth() / 2 and "TOPRIGHT" or "TOPLEFT"
-- overwrite position for tooltips without owner
local pos, parent = tooltip:GetPoint()
if parent and parent == UIParent and pos == "BOTTOMRIGHT" then
anchor = "BOTTOMRIGHT"
relative = "BOTTOMLEFT"
if parent and parent == UIParent and pos == "TOPRIGHT" then
anchor = "TOPRIGHT"
relative = "TOPLEFT"
end
-- first tooltip