WoWInterface SVN OpenRDX

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/VFL
    from Rev 680 to Rev 682
    Reverse comparison

Rev 680 → Rev 682

UI/FrameClasses/WindowFraming.lua
11,9 → 11,11
-- None FRAMING
-----------------------------------------------------
 
function VFLUI.Framing.None(self, titleHeight)
function VFLUI.Framing.None(self, titleHeight, bkd)
-------------------------- WINDOW DECOR
 
self.bkd = bkd;
 
local perf, perfText;
if VFLP.IsEnabled() then
perf = VFLUI.AcquireFrame("Frame");
35,7 → 37,11
 
---------------------------- FIXED ELEMENT LAYOUT
if self.SetInsets then
self:SetInsets(0, 0, 0, 0);
if self.bkd and self.bkd.insets then
self:SetInsets(self.bkd.insets.left or 0, self.bkd.insets.top or 0, self.bkd.insets.right or 0, self.bkd.insets.bottom or 0);
else
self:SetInsets(0, 0, 0, 0);
end
else
local clientArea = self:GetClientArea();
clientArea:ClearAllPoints();
44,6 → 50,8
self:SetWidth(dx); self:SetHeight(dy);
end
end
 
if self.bkd then self:SetBackdrop(self.bkd); end
 
----------------------------- LAYOUT OPERATORS
function self:_FrameLayout() end
59,10 → 67,19
perf:SetWidth(tw);
end
end
if not self.SetInsets then
 
if self.SetInsets then
if self.bkd and self.bkd.insets then
self:SetInsets(self.bkd.insets.left or 0, self.bkd.insets.top or 0, self.bkd.insets.right or 0, self.bkd.insets.bottom or 0);
else
self:SetInsets(0, 0, 0, 0);
end
else
local ca = self:GetClientArea();
ca:SetWidth(self:GetWidth()); ca:SetHeight(self:GetHeight());
end
 
if self.bkd then self:SetBackdrop(self.bkd); end
end
 
function self:_FrameDestroy()
72,6 → 89,8
perf:ClearAllPoints();
perf:Destroy(); perf = nil;
end
if self.bkd then self:SetBackdrop(nil); end
self.bkd = nil;
end
 
self:_FrameLayout();
83,7 → 102,10
-----------------------------------------------------
function VFLUI.Framing.Default(self, titleHeight, bkd)
-------------------------- WINDOW DECOR
self:SetBackdrop(bkd or VFLUI.BlackDialogBackdrop);
 
self.bkd = bkd or VFLUI.BlackDialogBackdrop;
 
--self:SetBackdrop(bkd or VFLUI.BlackDialogBackdrop);
 
local titleBar = self:GetTitleBar();
titleBar:SetPoint("TOPLEFT", self, "TOPLEFT", 5, -5);
143,6 → 165,8
self:SetWidth(dx + 10); self:SetHeight(dy + titleHeight + 7);
end
end
 
if self.bkd then self:SetBackdrop(self.bkd); end
 
----------------------------- LAYOUT OPERATORS
function self:_FrameLayout()
169,7 → 193,8
local ca = self:GetClientArea();
ca:SetWidth(tw - 10); ca:SetHeight(self:GetHeight() - titleHeight - 7);
end
self:SetBackdrop(bkd or VFLUI.BlackDialogBackdrop);
 
if self.bkd then self:SetBackdrop(self.bkd); end
end
 
function self:_FrameDestroy()
179,7 → 204,8
perf:ClearAllPoints();
perf:Destroy(); perf = nil;
end
self:SetBackdrop(nil);
if self.bkd then self:SetBackdrop(nil); end
self.bkd = nil;
VFLUI.ReleaseRegion(titleText); titleText = nil;
VFLUI.ReleaseRegion(tx1); tx1 = nil;
VFLUI.ReleaseRegion(tx2); tx2 = nil;
202,9 → 228,10
insets = { left = 0, right = 0, top = 0, bottom = 0 }
};
 
function VFLUI.Framing.Sleek(self)
function VFLUI.Framing.Sleek(self, bkd)
------------------------------------ WINDOW DECOR
self:SetBackdrop(plainBackdrop);
 
self.bkd = bkd or plainBackdrop;
 
local decor = VFLUI.AcquireFrame("Frame");
decor:SetParent(self);
268,7 → 295,11
 
---------------------------- FIXED ELEMENT LAYOUT
if self.SetInsets then
self:SetInsets(1, 14, 1, 1);
if self.bkd and self.bkd.insets then
self:SetInsets(self.bkd.insets.left or 1, (self.bkd.insets.top or 1) + 13, self.bkd.insets.right or 1, self.bkd.insets.bottom or 1);
else
self:SetInsets(1, 14, 1, 1);
end
else
local clientArea = self:GetClientArea();
clientArea:ClearAllPoints();
277,6 → 308,8
self:SetWidth(dx + 2); self:SetHeight(dy + 15);
end
end
 
if self.bkd then self:SetBackdrop(self.bkd); end
 
----------------------------- LAYOUT OPERATORS
function self:_FrameLayout()
305,7 → 338,8
local ca = self:GetClientArea();
ca:SetWidth(tw - 2); ca:SetHeight(self:GetHeight() - 15);
end
--self:SetBackdrop(plainBackdrop);
 
if self.bkd then self:SetBackdrop(self.bkd); end
end
 
function self:_FrameDestroy()