Skip to content
Open
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
36 changes: 26 additions & 10 deletions EllesmereUIChat/EllesmereUIChat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,14 @@ local BISECT_TEX_SHIFT_OFF = false -- 8: CLEARED (this cycle) -- textures
-- chat frame) as parent. Textures created directly on tabs (bg/hover)
-- are fine -- they existed in 8.5.2, field-clean.
local _tabHostClip
-- Keep tab borders/dividers above the chat tabs via frame level, not via a
-- global DIALOG strata. DIALOG made these small chat-only visuals win against
-- unrelated UI (most visibly the minimap) whenever their rectangles overlap.
local TAB_HOST_STRATA = "LOW"
local function GetTabHostClip()
if _tabHostClip then return _tabHostClip end
local clip = CreateFrame("Frame", nil, UIParent)
clip:SetFrameStrata("DIALOG")
clip:SetFrameStrata(TAB_HOST_STRATA)
clip:EnableMouse(false)
clip:SetClipsChildren(true)
local gdm = _G.GeneralDockManager
Expand Down Expand Up @@ -506,6 +510,14 @@ local function SidebarParticipatesInLayout(cfg)
or (mode == "mouseover" and _sidebarMouseoverLayoutVisible)
end

local function ShouldShowSidebarDivider(cfg)
return not cfg.hideBorders
and cfg.sidebarSeparate ~= true
-- Without the sidebar background this becomes an exposed edge line,
-- not a divider between two panel backgrounds, on either side.
and not cfg.hideSidebarBg
end

-- Extend the chat background up behind the tab strip (and the sidebar by the
-- same amount) so the tabs sit on one continuous panel instead of floating over
-- empty space. Opt-in via cfg.extendBgBehindTabs (default off, reload on toggle).
Expand Down Expand Up @@ -840,7 +852,7 @@ function ECHAT.ApplyBorders()
end
if CFD(cf1).sidebarDiv then
CFD(cf1).sidebarDiv:SetColorTexture(r, g, b, a)
CFD(cf1).sidebarDiv:SetShown(not hide)
CFD(cf1).sidebarDiv:SetShown(ShouldShowSidebarDivider(cfg))
end
end
-- Mirror border visibility onto the behind-tabs divider continuation.
Expand Down Expand Up @@ -1083,7 +1095,7 @@ function ECHAT.ApplySidebarPosition()
CFD(cf1).sidebarDiv:SetPoint("TOPRIGHT", sb, "TOPRIGHT", 0, 0)
CFD(cf1).sidebarDiv:SetPoint("BOTTOMRIGHT", sb, "BOTTOMRIGHT", 0, 0)
end
CFD(cf1).sidebarDiv:SetShown(cfg.sidebarSeparate ~= true)
CFD(cf1).sidebarDiv:SetShown(ShouldShowSidebarDivider(cfg))
end

-- Re-place the behind-tabs divider continuation onto the new edge.
Expand Down Expand Up @@ -1186,6 +1198,9 @@ function ECHAT.ApplySidebarBackground()
if PP.GetBorders(sb) then
PP.GetBorders(sb):SetShown(show)
end
if CFD(cf1).sidebarDiv then
CFD(cf1).sidebarDiv:SetShown(ShouldShowSidebarDivider(cfg))
end
-- Hide the sidebar extension too when the sidebar background is hidden.
if ECHAT.ApplyExtendedBackground then ECHAT.ApplyExtendedBackground() end
end
Expand Down Expand Up @@ -2737,10 +2752,11 @@ function ECHAT.ApplyTabBorders()
if host:GetParent() ~= wantedParent then
host:SetParent(wantedParent)
end
host:SetFrameStrata("DIALOG")
-- Constant level: hosts render on our clip at DIALOG strata,
-- so a tab-derived level is meaningless -- and tab:GetFrameLevel
-- was an un-exonerated tab getter in this (dirty-tested) pass.
host:SetFrameStrata(TAB_HOST_STRATA)
-- Constant level: hosts render above the tabs on the normal chat
-- strata without covering unrelated higher-strata UI. A tab-derived
-- level is meaningless here, and tab:GetFrameLevel was an
-- un-exonerated tab getter in this (dirty-tested) pass.
local level = 100
host:SetFrameLevel(level)
-- No alpha writes here at all: hosts default to 1, docked hosts
Expand Down Expand Up @@ -2814,7 +2830,7 @@ function ECHAT.ApplyTabSeparators()
end
if not ns._tabPanelSepHost then
local host = CreateFrame("Frame", nil, clip)
host:SetFrameStrata("DIALOG")
host:SetFrameStrata(TAB_HOST_STRATA)
host:SetFrameLevel(90)
host:EnableMouse(false)
host:SetHeight((PP and PP.mult) or 1)
Expand Down Expand Up @@ -2900,7 +2916,7 @@ local function SkinTab(cf)

local separatorHost = CreateFrame("Frame", nil, hostParent)
separatorHost:Hide()
separatorHost:SetFrameStrata("DIALOG")
separatorHost:SetFrameStrata(TAB_HOST_STRATA)
separatorHost:SetFrameLevel(90)
separatorHost:EnableMouse(false)
local onePx = (PP and PP.mult) or 1
Expand All @@ -2925,7 +2941,7 @@ local function SkinTab(cf)

local underlineHost = CreateFrame("Frame", nil, hostParent)
underlineHost:Hide()
underlineHost:SetFrameStrata("DIALOG")
underlineHost:SetFrameStrata(TAB_HOST_STRATA)
underlineHost:SetFrameLevel(95)
underlineHost:EnableMouse(false)
local activeUnderline = underlineHost:CreateTexture(nil, "OVERLAY", nil, 7)
Expand Down
Loading