The section is part of the
MainMenuBar's background. The short one in your picture is specifically
MainMenuBarArtFrameBackground.BackgroundSmall. You'd have to adjust its TexCoord to trim the right side off along with changing its width to match. Rendered on top of it is
ActionBarUpButton and
ActionBarDownButton along with
MainMenuBarArtFrame.PageNumber.
As a safety measure, I opted to turn off and disable
MultiActionBarBottomRight as it'll be more difficult to support that and the layout you want at the same time.
To make this into an addon, you can copy/paste it into
addon.bool.no.
Lua Code:
-- Hide gryphon endcaps, ActionBar page number, and up/down buttons
MainMenuBarArtFrame.LeftEndCap:Hide();
MainMenuBarArtFrame.RightEndCap:Hide();
MainMenuBarArtFrame.PageNumber:Hide();
ActionBarUpButton:Hide();
ActionBarDownButton:Hide();
-- :SetTexCoord() compounds on top of the atlas' own texcord currently, we need to reload the file used manually to apply our own
MainMenuBarArtFrameBackground.BackgroundSmall:SetTexture(1721259);-- Reload the image used by the "hud-MainMenuBar-small" atlas
MainMenuBarArtFrameBackground.BackgroundSmall:SetTexCoord(31/1024,539/1024,1/256,50/256);-- Apply our own TexCoord (trims right side by 42 pixels)
local function ResizeMainMenuBar()
if InCombatLockdown() then return; end-- Can't mess with protected objects in combat
if SHOW_MULTI_ACTIONBAR_2 then
SHOW_MULTI_ACTIONBAR_2=nil;-- Disable MultiActionBarBottomRight
InterfaceOptions_UpdateMultiActionBars();-- Save and apply change
return;-- Prevent running the next code twice, InterfaceOptions_UpdateMultiActionBars() restarts this whole process again
end
-- Revert changes from MainMenuBar:ChangeMenuBarSizeAndPosition()
MainMenuBar:SetWidth(508);
MainMenuBarArtFrame:SetWidth(508);
MainMenuBarArtFrameBackground:SetWidth(508);
MainMenuBarArtFrameBackground.BackgroundSmall:Show();
MainMenuBarArtFrameBackground.BackgroundLarge:Hide();
end
-- Disable "BottomRightBar" checkbox in "ActionBars"
InterfaceOptionsActionBarsPanelBottomRight:SetChecked(false);
InterfaceOptionsActionBarsPanelBottomRight:SetEnabled(false);
InterfaceOptionsActionBarsPanelBottomRight.Text:SetFontObject("GameFontDisableLeft");
-- Listen for MultiActionBarBottomRight visibility change (option is locked, but could be active on load)
hooksecurefunc(MainMenuBar,"ChangeMenuBarSizeAndPosition",ResizeMainMenuBar);
-- Listen for exiting combat in case a resize happened during it
local EventListener=CreateFrame("Frame");
EventListener:RegisterEvent("PLAYER_REGEN_ENABLED");
EventListener:SetScript("OnEvent",ResizeMainMenuBar);