update colorswatches with S:HandleColorSwatch

This commit is contained in:
Crum
2018-12-07 19:10:45 -06:00
parent 216f338d7e
commit f157e7d01f
3 changed files with 18 additions and 2 deletions
+1 -1
View File
@@ -289,7 +289,7 @@ function S:SkinAce3()
E:CreateBackdrop(frame, "Default")
end
E:Size(frame.backdrop, 16, 16)
E:Size(frame.backdrop, 24, 16)
frame.backdrop:ClearAllPoints()
E:Point(frame.backdrop, "LEFT", frame, "LEFT", 4, 0)
frame.backdrop:SetBackdropColor(0, 0, 0, 0)
+3 -1
View File
@@ -75,11 +75,13 @@ local function LoadSkin()
local buttonHighlight = _G["DropDownList"..i.."Button"..j.."Highlight"]
local colorSwatch = _G["DropDownList"..i.."Button"..j.."ColorSwatch"]
button:SetFrameLevel(buttonBackdrop:GetFrameLevel() + 1)
buttonHighlight:SetTexture(1, 1, 1, 0.3)
buttonHighlight:SetAllPoints(button)
colorSwatch:SetFrameLevel(button:GetFrameLevel() + 2)
S:HandleColorSwatch(colorSwatch, 14)
if i == 1 then
E:Point(buttonHighlight, "TOPLEFT", button, "TOPLEFT", -8, 0)
+14
View File
@@ -303,6 +303,20 @@ function S:HandleCheckBox(frame, noBackdrop)
end
end
function S:HandleColorSwatch(frame, size)
E:StripTextures(frame)
E:CreateBackdrop(frame, "Default")
frame.backdrop:SetFrameLevel(frame:GetFrameLevel())
if size then
E:Size(frame, size)
end
frame:GetNormalTexture():SetTexture(E.media.blankTex)
frame:GetNormalTexture():ClearAllPoints()
E:SetInside(frame:GetNormalTexture(), frame.backdrop)
end
function S:HandleIcon(icon, parent)
parent = parent or icon:GetParent()