From ad87c48d5bea1b64982e51920fe018829ab64d2a Mon Sep 17 00:00:00 2001 From: shagu Date: Tue, 3 Oct 2023 15:00:51 +0200 Subject: [PATCH] chat: use parent to determine right docked state --- modules/chat.lua | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/modules/chat.lua b/modules/chat.lua index 1ba82005..039a7302 100644 --- a/modules/chat.lua +++ b/modules/chat.lua @@ -334,17 +334,6 @@ pfUI:RegisterModule("chat", "vanilla:tbc", function () frame.pfCombatLog = nil end - for _, tex in pairs(CHAT_FRAME_TEXTURES) do - local texture = _G["ChatFrame"..i..tex] - texture.oldTexture = texture.oldTexture or texture:GetTexture() - - if i == 3 or frame.isDocked then - texture:SetTexture() - texture:Hide() - else - texture:SetTexture(texture.oldTexture) - end - end if not frame.pfStartMoving then frame.pfStartMoving = frame.StartMoving @@ -408,6 +397,19 @@ pfUI:RegisterModule("chat", "vanilla:tbc", function () v:SetHeight(C.global.font_size+default_border*2) end + -- remove background on docked frames + for _, tex in pairs(CHAT_FRAME_TEXTURES) do + local texture = _G["ChatFrame"..i..tex] + texture.oldTexture = texture.oldTexture or texture:GetTexture() + + if frame.isDocked or frame:GetParent() == pfUI.chat.right then + texture:SetTexture() + texture:Hide() + else + texture:SetTexture(texture.oldTexture) + end + end + _G["ChatFrame" .. i .. "ResizeBottom"]:Hide() _G["ChatFrame" .. i .. "TabText"]:SetJustifyV("CENTER") _G["ChatFrame" .. i .. "TabText"]:SetHeight(C.global.font_size+default_border*2)