ui-widgets: use yellow dropdowns by default

This commit is contained in:
shagu
2018-10-14 22:21:48 +02:00
parent aa023089ce
commit 4dec0cc216
+7 -6
View File
@@ -478,30 +478,29 @@ function pfUI.api.SkinCheckbox(frame)
end end
function pfUI.api.SkinDropDown(frame) function pfUI.api.SkinDropDown(frame)
StripTextures(frame)
CreateBackdrop(frame) CreateBackdrop(frame)
frame.backdrop:SetPoint("TOPLEFT", 15, -1) frame.backdrop:SetPoint("TOPLEFT", 15, -1)
frame.backdrop:SetPoint("BOTTOMRIGHT", -15, 6) frame.backdrop:SetPoint("BOTTOMRIGHT", -15, 6)
for i,v in ipairs({frame:GetRegions()}) do
if v.SetTexture then v:Hide() end
end
local button = _G[frame:GetName() .. "Button"] local button = _G[frame:GetName() .. "Button"]
button:SetNormalTexture(nil) button:SetNormalTexture(nil)
button:SetPushedTexture(nil) button:SetPushedTexture(nil)
button:SetHighlightTexture(nil) button:SetHighlightTexture(nil)
button:SetDisabledTexture(nil) button:SetDisabledTexture(nil)
StripTextures(button)
CreateBackdrop(button) CreateBackdrop(button)
button.backdrop:ClearAllPoints() button.backdrop:ClearAllPoints()
button.backdrop:SetWidth(18) button.backdrop:SetWidth(18)
button.backdrop:SetHeight(18) button.backdrop:SetHeight(18)
button.backdrop:SetPoint("RIGHT", button, "RIGHT", -2, 0) button.backdrop:SetPoint("RIGHT", button, "RIGHT", -2, 0)
if not button.icon then if not button.icon then
StripTextures(button) button.icon = button:CreateTexture(nil, "OVERLAY")
button.icon = button:CreateTexture(nil, "ARTWORK")
button.icon:SetTexture("Interface\\AddOns\\pfUI\\img\\down") button.icon:SetTexture("Interface\\AddOns\\pfUI\\img\\down")
button.icon:SetVertexColor(1,.9,.1)
button.icon:SetAlpha(.8) button.icon:SetAlpha(.8)
SetAllPointsOffset(button.icon, button.backdrop, 5) SetAllPointsOffset(button.icon, button.backdrop, 5)
end end
@@ -537,6 +536,8 @@ function pfUI.api.SkinDropDown(frame)
_G["DropDownList1Button" .. i]:SetWidth(DropDownList1.maxWidth) _G["DropDownList1Button" .. i]:SetWidth(DropDownList1.maxWidth)
end end
end) end)
frame.button = button
end end
function pfUI.api.SkinTab(frame, fixed) function pfUI.api.SkinTab(frame, fixed)