Add fill order option for actionbars

- "Row-first" fills buttons left-to-right, top-to-bottom (1,2,3 / 4,5,6)
- "Column-first" fills top-to-bottom, left-to-right (1,3,5 / 2,4,6)
- "Auto" preserves the original behavior based on uneven orientation
This commit is contained in:
Meow
2026-04-10 16:33:06 +02:00
parent 5f9e69933f
commit 9128f02133
3 changed files with 45 additions and 9 deletions
+3 -2
View File
@@ -1277,6 +1277,7 @@ pfUI:RegisterModule("actionbar", "vanilla", function ()
local background = C.bars["bar"..i].background
local formfactor = C.bars["bar"..i].formfactor
local uneven = C.bars["bar"..i].uneven or "Down"
local fillmode = C.bars["bar"..i].fillmode or "auto"
-- validate uneven against bar shape and reset if incompatible
local _, _, fcols2, frows2 = string.find(tostring(formfactor or ""), "(%d+)%s*x%s*(%d+)")
fcols2, frows2 = tonumber(fcols2), tonumber(frows2)
@@ -1421,7 +1422,7 @@ pfUI:RegisterModule("actionbar", "vanilla", function ()
bars[i][j] = CreateActionButton(bars[i], i, j)
bars[i][j].bar = i
BarButtonAnchor(bars[i][j], buttonbasename, j, buttons, formfactor, size, border, spacing, uneven)
BarButtonAnchor(bars[i][j], buttonbasename, j, buttons, formfactor, size, border, spacing, uneven, fillmode)
bars[i][j]:ClearAllPoints()
bars[i][j]:SetPoint(unpack(bars[i][j]._anchor))
bars[i][j]:Show()
@@ -1452,7 +1453,7 @@ pfUI:RegisterModule("actionbar", "vanilla", function ()
end
-- adjust actionbar size
BarLayoutSize(bars[i], buttons, formfactor, size, border, spacing, uneven)
BarLayoutSize(bars[i], buttons, formfactor, size, border, spacing, uneven, fillmode)
bars[i]:SetWidth(bars[i]._size[1])
bars[i]:SetHeight(bars[i]._size[2])
bars[i]:ClearAllPoints()