Skip to content

Commit

Permalink
🐛 FIX: Some borders on the OmniCD skin
Browse files Browse the repository at this point in the history
  • Loading branch information
Merathilis committed Nov 16, 2024
1 parent 73dba4c commit c482d6f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ElvUI_MerathilisUI/Modules/Skins/Extern/OmniCD.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ function module:OmniCD_Party_Icon()
end)
end

local function updateBorderVisibility(self)
local parent = self:GetParent()
if not parent or not parent.__MERSkin then
return
end

parent.__MERSkin:SetShown(self:IsShown())
end

function module:OmniCD_Party_ExtraBars()
local O = _G.OmniCD[1]
local colorDB = E.db.mui.gradient
Expand All @@ -39,6 +48,13 @@ function module:OmniCD_Party_ExtraBars()
if not icon.statusBar.__MERSkin then
icon.statusBar.__MERSkin = CreateFrame("Frame", nil, icon.statusBar)
icon.statusBar.__MERSkin:SetFrameLevel(icon.statusBar:GetFrameLevel() - 1)

-- bind the visibility to the original borders
if icon.statusBar.borderTop then
hooksecurefunc(icon.statusBar.borderTop, "SetShown", updateBorderVisibility)
hooksecurefunc(icon.statusBar.borderTop, "Hide", updateBorderVisibility)
hooksecurefunc(icon.statusBar.borderTop, "Show", updateBorderVisibility)
end
end

local x = icon:GetSize()
Expand Down

0 comments on commit c482d6f

Please sign in to comment.