From 7ae0c4c8de49259716b36a9f44897a457ebc0be4 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Sat, 19 Jun 2010 00:54:46 -0400 Subject: [PATCH] MAINPANEL_NORMAL_WIDTH and MAINPANEL_EXPANDED_WIDTH are now MainPanel.normal_width and MainPanel.expanded_width. --- Frame.lua | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Frame.lua b/Frame.lua index 5cf01f3..52d881e 100644 --- a/Frame.lua +++ b/Frame.lua @@ -73,10 +73,6 @@ local Player = private.Player ------------------------------------------------------------------------------- local ORDERED_PROFESSIONS = private.ordered_professions - -local MAINPANEL_NORMAL_WIDTH = 384 -local MAINPANEL_EXPANDED_WIDTH = 768 - local FILTERMENU_HEIGHT = 312 local FILTERMENU_SMALL = 112 @@ -973,7 +969,12 @@ end -- do local MainPanel do MainPanel = CreateFrame("Frame", "ARL_MainPanel", UIParent) - MainPanel:SetWidth(MAINPANEL_NORMAL_WIDTH) + + -- The panel width changes when contracting and expanding - store it for later use. + MainPanel.normal_width = 384 + MainPanel.expanded_width = 768 + + MainPanel:SetWidth(MainPanel.normal_width) MainPanel:SetHeight(512) MainPanel:SetFrameStrata("MEDIUM") MainPanel:SetToplevel(true) @@ -1314,7 +1315,7 @@ function MainPanel:ToggleState() local x, y = self:GetLeft(), self:GetBottom() if self.is_expanded then - self:SetWidth(MAINPANEL_NORMAL_WIDTH) + self:SetWidth(self.normal_width) self:SetHitRectInsets(0, 35, 0, 55) self.top_left:SetTexture("Interface\\QuestFrame\\UI-QuestLog-TopLeft") @@ -1328,7 +1329,7 @@ function MainPanel:ToggleState() self.progress_bar:SetWidth(210) self.close_button:SetWidth(111) else - self:SetWidth(MAINPANEL_EXPANDED_WIDTH) + self:SetWidth(self.expanded_width) self:SetHitRectInsets(0, 90, 0, 55) self.top_left:SetTexture("Interface\\QuestFrame\\UI-QuestLogDualPane-Left") -- 1.7.9.5