actionbar: fix custom button count layouts

* only show valid layout options for the actionbar size
* use fallback layout if necessary when bar size is changed
This commit is contained in:
Road-block
2019-03-31 14:59:21 +02:00
committed by shagu
parent 6a7357c295
commit 21d9c35de0
2 changed files with 10 additions and 6 deletions
+6
View File
@@ -660,6 +660,12 @@ pfUI:RegisterModule("actionbar", function ()
return
end
-- we changed bar size and stored layout is invalid, fallback
if not pfGridmath[buttons][BarLayoutFormfactor(formfactor)] then
formfactor = BarLayoutOptions(buttons)[1]
C.bars["bar"..i].formfactor = formfactor
end
local border = C.appearance.border.default
if C.appearance.border.actionbars ~= "-1" then
border = C.appearance.border.actionbars