View Feature Request
Rescale with Mousewheel
Feature #: 4307
File: Bartender4
Date: 11-28-10 03:23 PM
By: Lulia
Status: Under Review
A little feature I put into Bartender that I'd like for you to look over and possibly add if you find no issues with it in your addon design. It's semi-useless, though certainly not revolutionary. Here's the patch file generated by WinMerge:

Code:
38c38
< local barOnEnter, barOnLeave, barOnDragStart, barOnDragStop, barOnClick, barOnUpdateFunc, barOnAttributeChanged, barOnMouseWheel
---
> local barOnEnter, barOnLeave, barOnDragStart, barOnDragStop, barOnClick, barOnUpdateFunc, barOnAttributeChanged
101,117d100
< 	
< 	-- Function added by Lulia
< 	function barOnMouseWheel(self, delta)
< 		local parent = self:GetParent()
< 		local scale = parent:GetConfigScale()
< 		if Bartender4.isMouseWheel then
< 			if delta == 1 then
< 				scale = scale + 0.1
< 			elseif delta == -1 then
< 				if scale > 0.1 then
< 					scale = scale - 0.1
< 				end
< 			end
< 		end
< 		parent:SetScale(scale)
< 		parent.config.position.scale = scale
< 	end
191d173
< 	overlay:SetScript("OnMouseWheel", barOnMouseWheel) -- Added by Lulia
42,44d41
< 	-- Added by Lulia
< 	self.isMouseWheel = true;
< 	
329,344d325
< 		
< 		-- Added by Lulia
< 		local scaling = CreateFrame("CheckButton", "Bartender4Scaling", f, "OptionsCheckButtonTemplate")
< 		_G[scaling:GetName() .. "Text"]:SetText("Bar Scaling")
< 		
< 		scaling:SetScript("OnShow", function(self)
< 				self:SetChecked(Bartender4.isMouseWheel)
< 			end)
< 		
< 		scaling:SetScript("OnClick", function(self)
< 				if self:GetChecked() == 1 then
< 					Bartender4.isMouseWheel = true;
< 				else
< 					Bartender4.isMouseWheel = false;
< 				end
< 			end)
356d336
< 		scaling:SetPoint("BOTTOMLEFT", 134, 10)