mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
attempt to fix the size of frames
AceGUIContainer-ScrollFrame AceGUIContainer-TabGroup AceGUIContainer-TreeGroup
This commit is contained in:
@@ -147,10 +147,18 @@ local methods = {
|
|||||||
|
|
||||||
["OnWidthSet"] = function(self, width)
|
["OnWidthSet"] = function(self, width)
|
||||||
local content = self.content
|
local content = self.content
|
||||||
|
content:SetWidth(width)
|
||||||
content.width = width
|
content.width = width
|
||||||
end,
|
end,
|
||||||
|
|
||||||
["OnHeightSet"] = function(self, height)
|
["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
|
local content = self.content
|
||||||
content.height = height
|
content.height = height
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -301,6 +301,14 @@ local methods = {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
["OnHeightSet"] = function(self, height)
|
["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 content = self.content
|
||||||
local contentheight = height - (self.borderoffset + 23)
|
local contentheight = height - (self.borderoffset + 23)
|
||||||
if contentheight < 0 then
|
if contentheight < 0 then
|
||||||
|
|||||||
@@ -594,6 +594,14 @@ local methods = {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
["OnHeightSet"] = function(self, height)
|
["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 content = self.content
|
||||||
local contentheight = height - 20
|
local contentheight = height - 20
|
||||||
if contentheight < 0 then
|
if contentheight < 0 then
|
||||||
@@ -662,7 +670,6 @@ local function Constructor()
|
|||||||
|
|
||||||
local treeframe = CreateFrame("Frame", nil, frame)
|
local treeframe = CreateFrame("Frame", nil, frame)
|
||||||
treeframe:SetPoint("TOPLEFT", 0, 0)
|
treeframe:SetPoint("TOPLEFT", 0, 0)
|
||||||
treeframe:SetPoint("BOTTOMLEFT", 0, 0)
|
|
||||||
treeframe:SetWidth(DEFAULT_TREE_WIDTH)
|
treeframe:SetWidth(DEFAULT_TREE_WIDTH)
|
||||||
treeframe:EnableMouseWheel(true)
|
treeframe:EnableMouseWheel(true)
|
||||||
treeframe:SetBackdrop(PaneBackdrop)
|
treeframe:SetBackdrop(PaneBackdrop)
|
||||||
@@ -710,7 +717,7 @@ local function Constructor()
|
|||||||
--Container Support
|
--Container Support
|
||||||
local content = CreateFrame("Frame", nil, border)
|
local content = CreateFrame("Frame", nil, border)
|
||||||
content:SetPoint("TOPLEFT", 10, -10)
|
content:SetPoint("TOPLEFT", 10, -10)
|
||||||
content:SetPoint("BOTTOMRIGHT", -10, 10)
|
--content:SetPoint("BOTTOMRIGHT", -10, 10)
|
||||||
|
|
||||||
local widget = {
|
local widget = {
|
||||||
frame = frame,
|
frame = frame,
|
||||||
|
|||||||
Reference in New Issue
Block a user