Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions EllesmereUIChat/EllesmereUIChat_Tabs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand All @@ -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
Expand Down