Compute bar layout options instead of tabulating pfGridmath

pfGridmath listed every exact cols x rows grid per bar size; the only
live use was seeding the layout dropdown, which a divisor loop now does.

Everything else that read it was unreachable: every layout option is a
"cols x rows" string, so ResolveBarLayout's BarLayoutFormfactor lookup
never matched, and the actionbar module resets a stored layout that
isn't one before BarLayoutSize/BarButtonAnchor run, so their fallbacks
never fired. BarLayoutFormfactor and env/tables.lua go with it.
This commit is contained in:
Brues
2026-10-29 14:16:43 -05:00
parent 0890905eb6
commit 94dcfb3dad
4 changed files with 22 additions and 66 deletions
+1 -2
View File
@@ -1206,8 +1206,7 @@ pfUI:RegisterModule("actionbar", function ()
end
-- the stored layout is invalid, temporary fallback
local _, _, fcols, frows = string.find(tostring(formfactor or ""), "(%d+)%s*x%s*(%d+)")
if not ((fcols and frows) or pfGridmath[buttons][BarLayoutFormfactor(formfactor)]) then
if not fcols2 or not frows2 then
formfactor = BarLayoutOptions(buttons)[1]
end