From 3750fefa768feab04f7016f2a71e64beb508679f Mon Sep 17 00:00:00 2001 From: Bunny67 Date: Sat, 21 Jul 2018 17:12:22 +0300 Subject: [PATCH] attempt to fix the size of frames AceGUIContainer-ScrollFrame AceGUIContainer-TabGroup AceGUIContainer-TreeGroup --- .../widgets/AceGUIContainer-ScrollFrame.lua | 8 ++++++++ .../AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua | 8 ++++++++ .../AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua | 11 +++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua index 60b6f80..7139fee 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua @@ -147,10 +147,18 @@ local methods = { ["OnWidthSet"] = function(self, width) local content = self.content + content:SetWidth(width) content.width = width end, ["OnHeightSet"] = function(self, height) + local parent = self.parent + if parent and height then + height = (parent.content.height or 0) or height + self.frame.height = parent.content.height or 0 + end + self.scrollframe:SetHeight(height) + local content = self.content content.height = height end diff --git a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua index fbdf330..8818150 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua @@ -301,6 +301,14 @@ local methods = { end, ["OnHeightSet"] = function(self, height) + local parent = self.parent + if parent and height then + local _, _, _, _, offset = self:GetPoint() + height = (parent.content.height or 0) + (offset or 0) or height + self.frame.height = (parent.content.height or 0) + (offset or 0) + end + --self.frame:SetHeight(height) + local content = self.content local contentheight = height - (self.borderoffset + 23) if contentheight < 0 then diff --git a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua index c0b37bc..6811d53 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua @@ -594,6 +594,14 @@ local methods = { end, ["OnHeightSet"] = function(self, height) + local parent = self.parent + if parent and height then + local _, _, _, _, offset = self:GetPoint() + height = (parent.content.height or 0) + (offset or 0) or height + self.frame.height = (parent.content.height or 0) + (offset or 0) + end + self.treeframe:SetHeight(height) + local content = self.content local contentheight = height - 20 if contentheight < 0 then @@ -662,7 +670,6 @@ local function Constructor() local treeframe = CreateFrame("Frame", nil, frame) treeframe:SetPoint("TOPLEFT", 0, 0) - treeframe:SetPoint("BOTTOMLEFT", 0, 0) treeframe:SetWidth(DEFAULT_TREE_WIDTH) treeframe:EnableMouseWheel(true) treeframe:SetBackdrop(PaneBackdrop) @@ -710,7 +717,7 @@ local function Constructor() --Container Support local content = CreateFrame("Frame", nil, border) content:SetPoint("TOPLEFT", 10, -10) - content:SetPoint("BOTTOMRIGHT", -10, 10) + --content:SetPoint("BOTTOMRIGHT", -10, 10) local widget = { frame = frame,