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
+1 -1
View File
@@ -86,7 +86,7 @@ pfUI:RegisterModule("castbar", function ()
-- Per-craft spark position: the current craft's share of the bar's width.
-- Snaps back to the left edge each time StartTradeskillCraft restarts it.
local function MoveSpark()
local x = this.craft:GetElapsedPercent() * this.bar:GetWidth() - 1
local x = this.craft:GetElapsedPercent() * this.bar:GetUnscaledWidth() - 1
this.bar.spark:SetPoint("TOP", this.bar, "TOPLEFT", x, 0)
this.bar.spark:SetPoint("BOTTOM", this.bar, "BOTTOMLEFT", x, 0)
end
+1 -7
View File
@@ -2509,13 +2509,7 @@ pfUI:RegisterModule("combatlog", function ()
local buttonName, button, textWidth;
local buttonIndex = 1;
-- subtract the width of the dropdown button
local clogleft, clogright = COMBATLOG:GetRight(), COMBATLOG:GetLeft();
local maxWidth;
if ( clogleft and clogright ) then
maxWidth = (COMBATLOG:GetRight()-COMBATLOG:GetLeft())-31; --Hacky hacky because GetWidth goes crazy when it is docked
else
maxWidth = COMBATLOG:GetWidth() - 31;
end
local maxWidth = COMBATLOG:GetUnscaledWidth() - 31;
local additionalFilterButton = CombatLogQuickButtonFrame.AdditionalFilterButton;
+1 -1
View File
@@ -78,7 +78,7 @@ pfUI:RegisterModule("gui", function ()
-- basic frame
local frame = CreateFrame("Frame", nil, this)
frame:SetWidth(this.parent:GetRight()-this.parent:GetLeft()-20)
frame:SetWidth(this.parent:GetUnscaledWidth()-20)
frame:SetHeight(22)
frame:SetPoint("TOPLEFT", this, "TOPLEFT", 5, (this.objectCount*-23)-5)
+1 -1
View File
@@ -41,7 +41,7 @@ pfUI:RegisterModule("marktracking", function ()
local function ShortenName(name, row)
if not name or name == "" then return "" end
local barWidth = row.health:GetWidth()
local barWidth = row.health:GetUnscaledWidth()
if barWidth < 1 then barWidth = BAR_WIDTH end
local available = barWidth - 4
if rm_showpct then available = available - 32 end