mark dreamlayout overlay properly so it gets hidden for empty buttons
This commit is contained in:
+8
-6
@@ -20,7 +20,7 @@ local styledata = {
|
|||||||
["dream"] = {
|
["dream"] = {
|
||||||
texCoord = {0.08,0.92,0.08,0.92},
|
texCoord = {0.08,0.92,0.08,0.92},
|
||||||
padding = 3,
|
padding = 3,
|
||||||
customframe = true,
|
overlay = true,
|
||||||
FrameFunc = function(button)
|
FrameFunc = function(button)
|
||||||
local frame = CreateFrame("Frame", button:GetName().."DreamLayout", button)
|
local frame = CreateFrame("Frame", button:GetName().."DreamLayout", button)
|
||||||
frame:ClearAllPoints()
|
frame:ClearAllPoints()
|
||||||
@@ -37,14 +37,16 @@ function Bartender4.ButtonStyle.ApplyStyle(button, style)
|
|||||||
if not button.icon then return end
|
if not button.icon then return end
|
||||||
local style = styledata[style]
|
local style = styledata[style]
|
||||||
|
|
||||||
if style.customframe and style.FrameFunc and not button.overlay then
|
if style.overlay and style.FrameFunc and (not button.overlay or button.overlay.type ~= style) then
|
||||||
if not button.customframe then button.customframe = style.FrameFunc(button) end
|
if button.overlay then button.overlay:Hide() end
|
||||||
|
button.overlay = style.FrameFunc(button)
|
||||||
else
|
else
|
||||||
if button.customframe then
|
if button.overlay then
|
||||||
button.customframe:Hide()
|
button.overlay:Hide()
|
||||||
button.customframe = nil
|
button.overlay = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if style.texCoord then
|
if style.texCoord then
|
||||||
button.icon:SetTexCoord(unpack(style.texCoord))
|
button.icon:SetTexCoord(unpack(style.texCoord))
|
||||||
|
|||||||
Reference in New Issue
Block a user