diff Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua @ 11:371e14cd2feb

- major fixes with icons not showing correctly.
author Tercio
date Thu, 08 Dec 2016 13:01:40 -0200
parents c31ee4251181
children 3000eccbf1a0
line wrap: on
line diff
--- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua	Tue Oct 25 15:59:51 2016 -0200
+++ b/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua	Thu Dec 08 13:01:40 2016 -0200
@@ -2,10 +2,12 @@
 TreeGroup Container
 Container that uses a tree control to switch between groups.
 -------------------------------------------------------------------------------]]
-local Type, Version = "TreeGroup", 37
+local Type, Version = "TreeGroup", 40
 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
+local IsLegion = select(4, GetBuildInfo()) >= 70000
+
 -- Lua APIs
 local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
 local math_min, math_max, floor = math.min, math.max, floor
@@ -295,6 +297,7 @@
 	["OnAcquire"] = function(self)
 		self:SetTreeWidth(DEFAULT_TREE_WIDTH, DEFAULT_TREE_SIZABLE)
 		self:EnableButtonTooltips(true)
+		self.frame:SetScript("OnUpdate", FirstFrameUpdate)
 	end,
 
 	["OnRelease"] = function(self)
@@ -335,6 +338,8 @@
 		button.toggle.button = button
 		button.toggle:SetScript("OnClick",Expand_OnClick)
 
+		button.text:SetHeight(14) -- Prevents text wrapping
+
 		return button
 	end,
 
@@ -667,7 +672,12 @@
 
 	local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
 	scrollbg:SetAllPoints(scrollbar)
-	scrollbg:SetTexture(0,0,0,0.4)
+
+	if IsLegion then
+		scrollbg:SetColorTexture(0,0,0,0.4)
+	else
+		scrollbg:SetTexture(0,0,0,0.4)
+	end
 
 	local border = CreateFrame("Frame",nil,frame)
 	border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT")