From 993d752736db7e499f44c02b69eec7bc0724527a Mon Sep 17 00:00:00 2001 From: Petr Grabovoy Date: Sun, 12 Jun 2016 17:46:19 +0300 Subject: [PATCH] Resize fixes, still glitching sometimes --- ViragDevTool.lua | 13 ++++++------ ViragDevTool.xml | 60 +++++++++++++++++++++++++++++++----------------------- 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/ViragDevTool.lua b/ViragDevTool.lua index 6d4db9c..f1f2121 100644 --- a/ViragDevTool.lua +++ b/ViragDevTool.lua @@ -528,6 +528,7 @@ function ViragDevTool:UpdateMainTableUI(force) end HybridScrollFrame_Update(scrollFrame, totalRowsCount * buttons[1]:GetHeight(), scrollFrame:GetHeight()); + scrollFrame.scrollChild:SetWidth(scrollFrame:GetWidth()) end @@ -567,8 +568,8 @@ function ViragDevTool:DragResizeColumn(dragFrame, ignoreMousePosition) local parentFrame = dragFrame:GetParent() local offset = parentFrame:GetLeft() local pos = dragFrame:GetLeft() - offset - local minX = 300 - local maxX = parentFrame:GetWidth() - 150 + local minX = 150 + local maxX = parentFrame:GetWidth() - 50 if pos < minX then pos = minX end if pos > maxX then pos = maxX end @@ -586,7 +587,7 @@ end function ViragDevTool:UIUpdateMainTableButton(node, info, id) local nameButton = node.nameButton; - local typeButton = node.typeButton + --local typeButton = node.typeButton local valueButton = node.valueButton local rowNumberButton = node.rowNumberButton @@ -594,13 +595,13 @@ function ViragDevTool:UIUpdateMainTableButton(node, info, id) local name = info.name local padding = info.padding - nameButton:SetPoint("LEFT", node.typeButton, "RIGHT", 20 * padding, 0) + nameButton:SetPoint("LEFT", rowNumberButton, "RIGHT", 10 * padding - 10, 0) local valueType = type(value) valueButton:SetText(tostring(value)) nameButton:SetText(tostring(name)) - typeButton:SetText(valueType) + --typeButton:SetText(valueType) rowNumberButton:SetText(tostring(id)) -- local color = "ViragDevToolBaseFont" @@ -633,7 +634,7 @@ function ViragDevTool:UIUpdateMainTableButton(node, info, id) end nameButton:GetFontString():SetTextColor(unpack(color)) - typeButton:GetFontString():SetTextColor(unpack(color)) + -- typeButton:GetFontString():SetTextColor(unpack(color)) valueButton:GetFontString():SetTextColor(unpack(color)) rowNumberButton:GetFontString():SetTextColor(unpack(color)) diff --git a/ViragDevTool.xml b/ViragDevTool.xml index 76c4fee..6c3e03f 100644 --- a/ViragDevTool.xml +++ b/ViragDevTool.xml @@ -103,7 +103,11 @@ - + + + self.scrollChild:SetPoint("BOTTOM") + + @@ -191,13 +195,17 @@ - - - + - + - -