Added a fillmode variant to actionbars

This commit is contained in:
Meow
2026-04-10 15:24:39 +02:00
parent 9b97414beb
commit 0838c6ec3a
3 changed files with 46 additions and 15 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()