diff --git a/EllesmereUIChat/EllesmereUIChat_Tabs.lua b/EllesmereUIChat/EllesmereUIChat_Tabs.lua index 0b4fdc8cd..c2f108ea1 100644 --- a/EllesmereUIChat/EllesmereUIChat_Tabs.lua +++ b/EllesmereUIChat/EllesmereUIChat_Tabs.lua @@ -530,6 +530,8 @@ local function RefreshNow() local dockList = GENERAL_CHAT_DOCK and GENERAL_CHAT_DOCK.DOCKED_CHAT_FRAMES local count = 0 + local seenScrolling = false + local tabGap = (cfg.tabSpacing or 1) * ((EUI.PP and EUI.PP.mult) or 1) if type(dockList) == "table" then for i = 1, #dockList do local cf = dockList[i] @@ -550,12 +552,22 @@ local function RefreshNow() -- discriminator is the tab's REAL parent (the scroll -- child), never the temporary flag. local wantParent = strip - if scrollChild and tab:GetParent() == scrollChild - and EnsureDynClip() then + local isScrolling = scrollChild and tab:GetParent() == scrollChild + if isScrolling and EnsureDynClip() then wantParent = dynClip end if g:GetParent() ~= wantParent then g:SetParent(wantParent) end + -- FCFDock_UpdateTabs leaves one UI unit between tabs in each + -- group, but none before the first scrolling tab. Compensate + -- on our visual only; never re-anchor Blizzard's click targets. + local nativeGap = isScrolling and not seenScrolling and 0 or 1 + if isScrolling then seenScrolling = true end + local leftInset = count == 1 and leftExtend or 0 + if count > 1 and cfg.extendBgBehindTabs ~= true then + leftInset = tabGap - nativeGap + end + g:ClearAllPoints() local band = ns._chatBgExt if band and band:IsShown() then @@ -577,7 +589,7 @@ local function RefreshNow() g:SetPoint("RIGHT", tab, "RIGHT", 0, 0) else -- Island tabs: bottom-aligned to the tab, our height. - g:SetPoint("BOTTOMLEFT", tab, "BOTTOMLEFT", count == 1 and leftExtend or 0, 0) + g:SetPoint("BOTTOMLEFT", tab, "BOTTOMLEFT", leftInset, 0) g:SetPoint("BOTTOMRIGHT", tab, "BOTTOMRIGHT", 0, 0) g:SetHeight(height) end