ui-widgets: use better hooks to avoid ui tainting

This commit is contained in:
shagu
2020-04-03 12:57:11 +02:00
parent 09739ece88
commit 228b6f09ad
+17 -3
View File
@@ -586,9 +586,23 @@ function pfUI.api.SkinScrollbar(frame, always)
-- always show parent frame -- always show parent frame
if always then if always then
RunOOC(function() RunOOC(function()
parent:Show() parent:SetScript("OnHide", function() this:Show() end)
parent.Hide = function(self) frame.thumb:Hide() end if not up or parent.hooked then return end
parent.Show = function(self) frame.thumb:Show() end
local enable = up.Enable
local disable = up.Disable
up.Enable = function(self)
if enable then enable(self) end
frame.thumb:Show()
end
up.Disable = function(self)
if disable then disable(self) end
frame.thumb:Hide()
end
parent.hooked = true
end) end)
end end
end end