api: update SkinSlider

This commit is contained in:
2019-03-04 15:40:19 +03:00
committed by shagu
parent 74fa9df790
commit 8d02b7ebfd
+4 -15
View File
@@ -501,19 +501,8 @@ function pfUI.api.SkinSlider(frame)
local orientation = frame:GetOrientation()
local thumb = frame:GetThumbTexture()
if not frame.bg then
frame.bg = CreateFrame("Frame", nil, frame)
frame.bg:SetAllPoints(frame)
CreateBackdrop(frame.bg, nil, true)
end
if not frame.thumb then
thumb:SetTexture(nil)
frame.thumb = frame.bg:CreateTexture(nil, "ARTWORK")
frame.thumb:SetTexture(1, .82, 0)
frame.thumb:SetPoint("TOPLEFT", thumb, "TOPLEFT", 1, -4)
frame.thumb:SetPoint("BOTTOMRIGHT", thumb, "BOTTOMRIGHT", -1, 4)
end
CreateBackdrop(frame, nil, true)
thumb:SetTexture(1, .82, 0)
for i,region in ipairs({frame:GetRegions()}) do
if region:GetObjectType() == 'FontString' then
@@ -540,10 +529,10 @@ function pfUI.api.SkinSlider(frame)
if orientation == 'VERTICAL' then
frame:SetWidth(10)
thumb:SetHeight(22)
thumb:SetWidth(12)
thumb:SetWidth(frame:GetWidth())
else
frame:SetHeight(10)
thumb:SetHeight(17)
thumb:SetHeight(frame:GetHeight())
thumb:SetWidth(17)
end
end