Quantcast

Resize working fine now after bugfix

Petr Grabovoy [06-13-16 - 03:04]
Resize working fine now after bugfix
Filename
ViragDevTool.lua
ViragDevTool.xml
diff --git a/ViragDevTool.lua b/ViragDevTool.lua
index 380589c..6bfdc93 100644
--- a/ViragDevTool.lua
+++ b/ViragDevTool.lua
@@ -581,10 +581,12 @@ function ViragDevTool:ResizeMainFrame(dragFrame)
     local maxX, maxY = parentFrame:GetMaxResize()
     local minX, minY = parentFrame:GetMinResize()

+
     parentFrame:SetSize(self:CalculatePosition(x - left, minX, maxX),
         self:CalculatePosition(top - y, minY, maxY))
 end

+
 function ViragDevTool:DragResizeColumn(dragFrame, ignoreMousePosition)
     local parentFrame = dragFrame:GetParent()

diff --git a/ViragDevTool.xml b/ViragDevTool.xml
index c61782b..c398b3f 100644
--- a/ViragDevTool.xml
+++ b/ViragDevTool.xml
@@ -317,7 +317,7 @@
                 ViragDevTool:OnLoad(self)
                 self:SetUserPlaced(true)
                 self:SetMinResize(600, 200);
-                self:SetMaxResize(1200, 900);
+                self:SetMaxResize(UIParent:GetWidth(), UIParent:GetHeight());
                 self:RegisterForDrag("LeftButton");
             </OnLoad>

@@ -344,7 +344,11 @@
                         self:RegisterForDrag("LeftButton");
                     </OnLoad>
                     <OnDragStart>
-
+                        local p = self:GetParent()
+                        local x = p:GetLeft()
+                        local y = -1 * (UIParent:GetHeight() - p:GetTop())
+                        p:ClearAllPoints()
+                        p:SetPoint("TOPLEFT", UIParent, "TOPLEFT", x, y)
                         self:SetButtonState("PUSHED", true);
                         self:GetHighlightTexture():Hide();