tweak style support

This commit is contained in:
Hendrik Leppkes
2008-03-11 09:06:05 +00:00
parent 8b4d870e36
commit f7845069b5
4 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -132,7 +132,6 @@ function ActionBar:ApplyConfig(config)
self:UpdateButtons()
self:UpdateStates()
self:ForAll("ApplyStyle", self.config.style)
end
-- Update the number of buttons in our bar, creating new ones if necessary
@@ -154,6 +153,7 @@ function ActionBar:UpdateButtons(numbuttons)
-- show active buttons
for i = 1, numbuttons do
buttons[i]:Show()
buttons[i]:ApplyStyle(self.config.style)
buttons[i]:UpdateAction(true)
end
+4 -2
View File
@@ -84,8 +84,8 @@ function Bartender4.Button:Create(id, parent)
button:RegisterButtonEvents()
button:Show()
button:UpdateAction(true)
--button:Show()
--button:UpdateAction(true)
return button
end
@@ -390,6 +390,7 @@ function Button:SetTooltip()
end
function Button:ShowButton()
if self.overlay and self.overlay.type == "cy" then return end
self.pushedTexture:SetTexture(self.textureCache.pushed)
self.highlightTexture:SetTexture(self.textureCache.highlight)
@@ -399,6 +400,7 @@ function Button:ShowButton()
end
function Button:HideButton()
if self.overlay and self.overlay.type == "cy" then return end
self.pushedTexture:SetTexture("")
self.highlightTexture:SetTexture("")
+1
View File
@@ -192,6 +192,7 @@ end
-- execute a member function on all buttons
function ButtonBar:ForAll(method, ...)
if not self.buttons then return end
for _, button in self:GetAll() do
local func = button[method]
if func then
+3 -3
View File
@@ -46,11 +46,11 @@ function Bartender4.ButtonStyle.ApplyStyle(button, styleName)
if cy then
style = styledata.default
if button.overlay and button.overlay.type ~= "cy" then
if button.overlay then
button.overlay:Hide()
button.overlay = _G[button:GetName() .. "Overlay"]
button.overlay.type = "cy"
end
button.overlay = _G[button:GetName() .. "Overlay"]
button.overlay.type = "cy"
end
if style.overlay and style.FrameFunc then