ElvUI WindTools

ElvUI WindTools

3M Downloads

[Bug] Windtool's shadowing function sometime overlapping other addons.

hobulian opened this issue ยท 1 comments

commented

Like tooltip addon tiptac. Sometimes windtool's shadow overlapping tiptac's tooltip border.

ElvUI_WindTools creates a new shadow frame at the original frame (frame.shadow) and sets it the following way:

local shadow = CreateFrame("Frame", nil, frame, "BackdropTemplate")
shadow:SetFrameStrata(frame:GetFrameStrata())
shadow:SetFrameLevel(frame:GetFrameLevel() or 1)
shadow:SetOutside(frame, size, size)
shadow:SetBackdrop({edgeFile = LSM:Fetch("border", "ElvUI GlowBorder"), edgeSize = size + 1})
shadow:SetBackdropColor(r, g, b, 0)
shadow:SetBackdropBorderColor(r, g, b, 0.618)

The frame strata and level is the same, so it's random which frame is in front. In my opinion, the following adjustment in ElvUI_WindTools is needed:

local shadowFrameLevel = 1
if frame:GetFrameLevel() then
    shadowFrameLevel = frame:GetFrameLevel() - 1
    if shadowFrameLevel < 0 then
        shadowFrameLevel = 0
    end
end
shadow:SetFrameLevel(shadowFrameLevel)
commented

I know what you concerning.
However, the change will get mess if other frame with the frame level set to frame:GetFrameLevel() - 1.
The perfect solution for me is that creating a special skin for these addons and override the frame level manually.
If you have time to make some small tweaks on these addon, feel free to pull request to this project.