From 874aaa07abe0e8951580d667129a00f3b6f9058a Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 10 Jun 2019 17:30:09 +0200 Subject: [PATCH] tooltip: fix frame scaling for top anchor position --- modules/tooltip.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/tooltip.lua b/modules/tooltip.lua index 7c212089..436f4924 100644 --- a/modules/tooltip.lua +++ b/modules/tooltip.lua @@ -28,12 +28,13 @@ pfUI:RegisterModule("tooltip", "vanilla:tbc", function () if C.tooltip.cursoralign ~= "native" then -- create mouse follow frame if not tooltip.cursor then - tooltip.cursor = CreateFrame("Frame") + tooltip.cursor = CreateFrame("Frame", nil, UIParent) tooltip.cursor:SetWidth(tonumber(C.tooltip.cursoroffset) * 2) tooltip.cursor:SetHeight(tonumber(C.tooltip.cursoroffset) * 2) tooltip.cursor:SetScript("OnUpdate", function() + local scale = UIParent:GetScale() local x, y = GetCursorPosition() - this:SetPoint("CENTER", UIParent, "BOTTOMLEFT", x, y) + this:SetPoint("CENTER", UIParent, "BOTTOMLEFT", x/scale, y/scale) if C.tooltip.cursoralign == "top" then tooltip.cursor:SetWidth(tooltip:GetWidth()) end