Frame sizes: measure anchor-sized regions with the unscaled getters

GetWidth/GetHeight return an anchor-sized region's size times its effective
scale, so at any UI scale but 1 they disagreed with the sizes and offsets
built from them. The craft spark, raid-marker name shortening, unit frame
indicators, dropdown widening and the cooldown font's first size now read
GetUnscaledWidth/GetUnscaledHeight. The combat log and the settings rows
drop their GetRight()-GetLeft() workarounds for the same bug.
This commit is contained in:
Brues
2026-11-02 16:12:15 -06:00
parent a219bd13dc
commit f7769ec6ac
7 changed files with 9 additions and 15 deletions
+2 -2
View File
@@ -85,7 +85,7 @@ local function SetupCooldown(cooldown)
cooldown:SetReverse(kind == "aura")
cooldown:SetMinimumCountdownDuration(kind == "spell" and tonumber(C.cooldown.threshold) * 1000 or 0)
cooldown:SetCountdownFormatter(GetFormatter())
UpdateFont(cooldown, cooldown:GetParent():GetHeight())
UpdateFont(cooldown, cooldown:GetParent():GetUnscaledHeight())
end
-- applies the "foreign" timers to another addon's cooldown. They only take
@@ -107,7 +107,7 @@ local function SetupForeign(cooldown)
cooldown:SetMinimumCountdownDuration(tonumber(C.cooldown.threshold) * 1000)
cooldown:SetCountdownFormatter(GetFormatter())
UpdateFont(cooldown, (cooldown:GetParent() or cooldown):GetHeight())
UpdateFont(cooldown, (cooldown:GetParent() or cooldown):GetUnscaledHeight())
end
-- runs as a pfUI cooldown's timer starts: a timer with a total brings back
+1 -1
View File
@@ -601,7 +601,7 @@ function pfUI.api.SkinDropDown(frame, cr, cg, cb, useSmall)
button:HookScript("OnClick", function()
local DropDownListWidth = DropDownList1:GetWidth()
local DropDownFrameWidth = frame.backdrop:GetWidth()
local DropDownFrameWidth = frame.backdrop:GetUnscaledWidth()
if DropDownListWidth < DropDownFrameWidth then
local diff = DropDownFrameWidth - DropDownListWidth
DropDownList1:SetWidth(DropDownList1:GetWidth() + diff)
+2 -2
View File
@@ -2042,7 +2042,7 @@ function pfUI.uf:RefreshUnit(unit, component)
local size
if disptype == "4" or disptype == "3" then
size = unit.hp.bar:GetHeight() * tonumber(unit.config.debuff_ind_size)
size = unit.hp.bar:GetUnscaledHeight() * tonumber(unit.config.debuff_ind_size)
if size ~= indicator.size or disptype ~= indicator.disp or indipos ~= indicator.ipos then
indicator:ClearAllPoints()
indicator:SetPoint(indipos, 0, 0)
@@ -2447,7 +2447,7 @@ function pfUI.uf:AddIcon(frame, pos, icon, timeleft, stacks, start, duration)
if not frame.hp then return end
local frame = frame.hp.bar
if pos > 6 or pos > ceil(frame:GetWidth() / iconsize) then return end
if pos > 6 or pos > ceil(frame:GetUnscaledWidth() / iconsize) then return end
frame.icon = frame.icon or CreateFrame("Frame", nil, frame)