From 2108c39ef4b82bf4beb6766a61f6a58dd9c61b65 Mon Sep 17 00:00:00 2001 From: Dmytro Kharchenko Date: Tue, 1 Sep 2026 05:35:54 +0000 Subject: [PATCH] Honour the dispel border toggles when indicators are created on Classic Retail's HandleIndicators applies "showDispelBorder" (debuffs) and "showDispelFrameBorder" (dispels) together with the thickness when an indicator is created; the Cata/Wrath, Mists and Vanilla/TBC copies only called SetThickness, so the dispel-type border came back on at every indicator (re)creation - the first group after a reload, a layout switch - regardless of the setting. Ported retail's block to the three files. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_011YngV4VgYFwrPdgvWYVz7p --- RaidFrames/UnitButton_Cata_Wrath.lua | 20 +++++++++++++++++--- RaidFrames/UnitButton_Mists.lua | 20 +++++++++++++++++--- RaidFrames/UnitButton_Vanilla.lua | 20 +++++++++++++++++--- 3 files changed, 51 insertions(+), 9 deletions(-) diff --git a/RaidFrames/UnitButton_Cata_Wrath.lua b/RaidFrames/UnitButton_Cata_Wrath.lua index 15ce6b7a..f50a6b69 100644 --- a/RaidFrames/UnitButton_Cata_Wrath.lua +++ b/RaidFrames/UnitButton_Cata_Wrath.lua @@ -228,12 +228,26 @@ local function HandleIndicators(b) P.Size(indicator, t["size"][1], t["size"][2]) end end - -- update thickness + -- update thickness (+ dispel border on/off for debuffs, "off" = 0 thickness) + --! same as retail UnitButton.lua: without this the dispel-type border came back on every time the + --! indicators were (re)created - first group after a reload, layout switch - whatever the setting. if t["thickness"] then - indicator:SetThickness(t["thickness"]) + if t["indicatorName"] == "debuffs" then + if indicator.SetBorder then + local on = t["showDispelBorder"] ~= false + indicator:SetBorder(on and t["thickness"] or 0) + end + elseif t["indicatorName"] == "dispels" then + if indicator.SetFrameBorderThickness then + indicator:SetFrameBorderThickness(t["thickness"]) + indicator:SetFrameBorderEnabled(t["showDispelFrameBorder"] == true) + end + else + indicator:SetThickness(t["thickness"]) + end end -- update border - if t["border"] then + if t["border"] and indicator.SetBorder then indicator:SetBorder(t["border"]) end -- update height diff --git a/RaidFrames/UnitButton_Mists.lua b/RaidFrames/UnitButton_Mists.lua index 96557ac9..90f0befe 100644 --- a/RaidFrames/UnitButton_Mists.lua +++ b/RaidFrames/UnitButton_Mists.lua @@ -249,12 +249,26 @@ local function HandleIndicators(b) P.Size(indicator, t["size"][1], t["size"][2]) end end - -- update thickness + -- update thickness (+ dispel border on/off for debuffs, "off" = 0 thickness) + --! same as retail UnitButton.lua: without this the dispel-type border came back on every time the + --! indicators were (re)created - first group after a reload, layout switch - whatever the setting. if t["thickness"] then - indicator:SetThickness(t["thickness"]) + if t["indicatorName"] == "debuffs" then + if indicator.SetBorder then + local on = t["showDispelBorder"] ~= false + indicator:SetBorder(on and t["thickness"] or 0) + end + elseif t["indicatorName"] == "dispels" then + if indicator.SetFrameBorderThickness then + indicator:SetFrameBorderThickness(t["thickness"]) + indicator:SetFrameBorderEnabled(t["showDispelFrameBorder"] == true) + end + else + indicator:SetThickness(t["thickness"]) + end end -- update border - if t["border"] then + if t["border"] and indicator.SetBorder then indicator:SetBorder(t["border"]) end -- update height diff --git a/RaidFrames/UnitButton_Vanilla.lua b/RaidFrames/UnitButton_Vanilla.lua index 11d9e7cf..1a231fa2 100644 --- a/RaidFrames/UnitButton_Vanilla.lua +++ b/RaidFrames/UnitButton_Vanilla.lua @@ -214,12 +214,26 @@ local function HandleIndicators(b) P.Size(indicator, t["size"][1], t["size"][2]) end end - -- update thickness + -- update thickness (+ dispel border on/off for debuffs, "off" = 0 thickness) + --! same as retail UnitButton.lua: without this the dispel-type border came back on every time the + --! indicators were (re)created - first group after a reload, layout switch - whatever the setting. if t["thickness"] then - indicator:SetThickness(t["thickness"]) + if t["indicatorName"] == "debuffs" then + if indicator.SetBorder then + local on = t["showDispelBorder"] ~= false + indicator:SetBorder(on and t["thickness"] or 0) + end + elseif t["indicatorName"] == "dispels" then + if indicator.SetFrameBorderThickness then + indicator:SetFrameBorderThickness(t["thickness"]) + indicator:SetFrameBorderEnabled(t["showDispelFrameBorder"] == true) + end + else + indicator:SetThickness(t["thickness"]) + end end -- update border - if t["border"] then + if t["border"] and indicator.SetBorder then indicator:SetBorder(t["border"]) end -- update height