Alright, sweet, think I'm starting to get it now!
But essentially, in my actionbars.lua file I'm creating a holder frame for the action bars.
Lua Code:
ns.MultiBarHolder = CreateFrame("Frame","MultiBarHolder",MainMenuBar,"SecureHandlerStateTemplate")
ns.MultiBarHolder:SetPoint("BOTTOM",MainMenuBar,"BOTTOM",0,29)
And this frame essentially contains two more frames, MultiBarLeft and MultiBarRight, both of which are filled with the MultiBarBottomLeft/Right action buttons. And this part is perfectly fine, they're static frames anchored inside of the holder frame, and there's nothing happening to them.
Then there's this function, located inside bottomframe.lua, that works as a visibility handler for the bottom chunk of the UI. It scales the bottom frame based on what's in it, like it shows in the GIF at the top, and it runs on events updating experience and reputation, upon login, OnHide and OnShow for the game's default MultiBarBottom frames, so pretty much anything that affects the visibility of its contents.
Lua Code:
local function BottomElementsHandler()
-- Checking button visibility on their original container frames
local VisibleLeft = MultiBarBottomLeft:IsVisible()
local VisibleRight = MultiBarBottomRight:IsVisible()
local RepVisible = ns.Reputation:IsShown()
local ExpVisible = ns.Experience:IsShown()
local BarWidth = 483
local BarHeight = 11
-- Visibility handling for the MultiBars
if VisibleLeft and VisibleRight then
ns.MultiBarHolder:SetHeight(40)
ns.MultiBarHolder:SetWidth((458*2))
elseif VisibleLeft or VisibleRight then
ns.MultiBarHolder:SetHeight(40)
ns.MultiBarHolder:SetWidth(460)
else
ns.MultiBarHolder:SetHeight(1)
ns.MultiBarHolder:SetWidth(460)
end
-- Visibility for the MultiBar art
if VisibleLeft or VisibleRight then
ns.MultiBarRightArt:Show()
ns.MultiBarLeftArt:Show()
else
ns.MultiBarRightArt:Hide()
ns.MultiBarLeftArt:Hide()
end
-- Set width for the statusbars
if (ns.MultiBarHolder:GetWidth() > 500) then
BarWidth = ns.MultiBarHolder:GetWidth()+4
else
BarWidth = 464
end
-- Set the anchor points of the Exp and Rep bars
if RepVisible and ExpVisible then
ns.ExpRepHolder:SetHeight(BarHeight)
ns.Reputation:SetPoint("RIGHT",ns.ExpRepHolder,"RIGHT")
ns.Reputation:SetPoint("LEFT",ns.ExpRepHolder,"CENTER")
ns.Experience:SetPoint("LEFT",ns.ExpRepHolder,"LEFT")
ns.Experience:SetPoint("RIGHT",ns.ExpRepHolder,"CENTER")
elseif RepVisible or ExpVisible then
ns.ExpRepHolder:SetHeight(BarHeight)
ns.Reputation:SetPoint("LEFT",ns.ExpRepHolder,"LEFT")
ns.Reputation:SetPoint("RIGHT",ns.ExpRepHolder,"RIGHT")
ns.Experience:SetPoint("LEFT",ns.ExpRepHolder,"LEFT")
ns.Experience:SetPoint("RIGHT",ns.ExpRepHolder,"RIGHT")
else
ns.ExpRepHolder:SetHeight(1)
end
ns.ExpRepHolder:SetWidth(BarWidth)
MicroBarTexture:SetWidth(ns.MultiBarHolder:GetWidth()+4)
LeftEdgeArt:SetPoint("TOPRIGHT",ns.ExpRepHolder,"TOPLEFT",83,28)
RightEdgeArt:SetPoint("TOPLEFT",ns.ExpRepHolder,"TOPRIGHT",-83,28)
end
And it's really just the visibility for the MultiBarHolder, on line 12 - 21, that screws up. It should be doing exactly the same thing, set its own width and height based on the visibility of its two child frames, and that is pretty much the extent of it.