From d21111207de2666f0d64e7df740763a65058e351 Mon Sep 17 00:00:00 2001 From: Derek Mikesell Date: Sat, 20 Jun 2026 12:59:21 -0700 Subject: [PATCH] fix(raidframes): honor class color in live health-bar background The class-color background option (Raid Frames > Health Bar > Background) worked in the preview but reverted to the custom color on live frames. The preview and reload paths use ns.GetBgColor (which honors bgClassColored), but the live update paths (UpdateButton, _UpdateButtonHealth) called ns._ApplyHealthBg, which hardcoded s.customBgColor. Since UNIT_HEALTH fires constantly in combat, _ApplyHealthBg repainted the custom color over the class tint set at reload. Route the alive/online branch through ns.GetBgColor so the live path stays in lockstep with the preview/reload paths. Fixes party and raid (both call sites already pass the correctly-resolved settings proxy). --- EllesmereUIRaidFrames/EllesmereUIRaidFrames.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/EllesmereUIRaidFrames/EllesmereUIRaidFrames.lua b/EllesmereUIRaidFrames/EllesmereUIRaidFrames.lua index cae0aadc..ca196544 100644 --- a/EllesmereUIRaidFrames/EllesmereUIRaidFrames.lua +++ b/EllesmereUIRaidFrames/EllesmereUIRaidFrames.lua @@ -1179,8 +1179,11 @@ function ns._ApplyHealthBg(d, health, s, unit) if s.healthColorMode == "dark" then bg:SetColorTexture(DARK_BG_R, DARK_BG_G, DARK_BG_B, 1) else - local bgc = s.customBgColor - bg:SetColorTexture(bgc.r, bgc.g, bgc.b, (s.bgDarkness or 50) / 100) + -- Class-colored when bgClassColored is set, else the custom bg color. + -- GetBgColor returns r,g,b,a (a = bgDarkness) and is secret-safe; routing + -- through it keeps this live path in lockstep with the preview/reload + -- paths, which otherwise repaint custom color over the class tint. + bg:SetColorTexture(ns.GetBgColor(unit, s)) end end