This commit is contained in:
Bunny67
2017-12-23 14:10:38 +03:00
parent 49fd843612
commit b332e3f438
@@ -84,7 +84,6 @@ local function UpdateButton(button, treeline, selected, canExpand, isExpanded)
local normalTexture = button:GetNormalTexture() local normalTexture = button:GetNormalTexture()
local line = button.line local line = button.line
button.level = level button.level = level
if ( level == 1 ) then if ( level == 1 ) then
button.text:SetFontObject("GameFontNormal") button.text:SetFontObject("GameFontNormal")
button:SetHighlightFontObject("GameFontHighlight") button:SetHighlightFontObject("GameFontHighlight")
@@ -227,7 +226,7 @@ local function Button_OnEnter()
if self.enabletooltips then if self.enabletooltips then
GameTooltip:SetOwner(this, "ANCHOR_NONE") GameTooltip:SetOwner(this, "ANCHOR_NONE")
GameTooltip:SetPoint("LEFT",this,"RIGHT") GameTooltip:SetPoint("LEFT",this,"RIGHT")
GameTooltip:SetText(this.text:GetText() or "", 1, .82, 0, true) GameTooltip:SetText(this.text:GetText() or "", 1, .82, 0, 1)
GameTooltip:Show() GameTooltip:Show()
end end
@@ -284,14 +283,14 @@ end
local function Dragger_OnMouseUp() local function Dragger_OnMouseUp()
local treeframe = this:GetParent() local treeframe = this:GetParent()
local self = treeframe.obj local self = treeframe.obj
local this = treeframe:GetParent() local frame = treeframe:GetParent()
treeframe:StopMovingOrSizing() treeframe:StopMovingOrSizing()
--treeframe:SetScript("OnUpdate", nil) --treeframe:SetScript("OnUpdate", nil)
treeframe:SetUserPlaced(false) treeframe:SetUserPlaced(false)
--Without this :GetHeight will get stuck on the current height, causing the tree contents to not resize --Without this :GetHeight will get stuck on the current height, causing the tree contents to not resize
treeframe:SetHeight(0) treeframe:SetHeight(0)
treeframe:SetPoint("TOPLEFT", this, "TOPLEFT",0,0) treeframe:SetPoint("TOPLEFT", frame, "TOPLEFT",0,0)
treeframe:SetPoint("BOTTOMLEFT", this, "BOTTOMLEFT",0,0) treeframe:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT",0,0)
local status = self.status or self.localstatus local status = self.status or self.localstatus
status.treewidth = treeframe:GetWidth() status.treewidth = treeframe:GetWidth()