From 1b81e4750845b24b26aecc4de8b7aadf2f3d51d3 Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Mon, 31 Aug 2026 13:43:08 +0200 Subject: [PATCH] Center XP bar with floating actionbar --- mods/actionbar-float.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/mods/actionbar-float.lua b/mods/actionbar-float.lua index 7ffbf56..9445875 100644 --- a/mods/actionbar-float.lua +++ b/mods/actionbar-float.lua @@ -58,8 +58,26 @@ module.enable = function(self) background:SetVertexColor(0, 0, 0, .5) end + -- center the experience bar when Floating Actionbar is used on its own. + -- Reduced Actionbar applies its own matching offset, so avoid shifting it twice. + local function UpdateExperiencePosition() + local reducedEnabled = ShaguTweaks_config + and ShaguTweaks_config[T["Reduced Actionbar Size"]] == 1 + + if reducedEnabled then return end + + MainMenuExpBar:ClearAllPoints() + if ReputationWatchBar:IsShown() then + MainMenuExpBar:SetPoint("TOP", MainMenuBar, "TOP", 0, 0) + else + MainMenuExpBar:SetPoint("TOP", MainMenuBar, "TOP", 0, 3) + end + end + -- keep the custom reputation position without replacing Blizzard's updater local function UpdateReputationPosition() + UpdateExperiencePosition() + ReputationWatchBar:ClearAllPoints() if MainMenuExpBar:IsShown() then ReputationWatchBar:SetPoint("BOTTOM", MainMenuBar, "TOP", 0, -7)