ui-widgets: use existing icon if available

This commit is contained in:
shagu
2021-12-31 11:26:55 +01:00
parent fde80d5d8e
commit f6708bb907
+3 -2
View File
@@ -674,9 +674,10 @@ function pfUI.api.SkinCollapseButton(button, all)
local b = _G[button]
if not b then b = button end
if not b then return end
b.icon = CreateFrame("Button", b:GetName().."CollapseButton", b)
local name = b:GetName() .. "CollapseButton"
local size = 10
b.icon = _G[name] or CreateFrame("Button", name, b)
if all then size = 14 end
b.icon:SetWidth(size)
b.icon:SetHeight(size)