From 06cca0c92da6e5ad5430ce6db74a1b1293b3f263 Mon Sep 17 00:00:00 2001 From: Safturento Date: Wed, 26 Oct 2011 22:41:09 -0500 Subject: [PATCH] Minor graphical change, the scroll frame looks a bit cleaner this way. --- stAddonManager/stAddonManager.lua | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/stAddonManager/stAddonManager.lua b/stAddonManager/stAddonManager.lua index 491647e..085daa2 100644 --- a/stAddonManager/stAddonManager.lua +++ b/stAddonManager/stAddonManager.lua @@ -95,14 +95,7 @@ local function SkinScrollBar(frame, thumbTrim) StripTextures(dScroll) dScroll:EnableMouse(false) uScroll:EnableMouse(false) - - if not frame.trackbg then - frame.trackbg = CreateFrame("Frame", nil, frame) - frame.trackbg:SetPoint("TOPLEFT", uScroll, "TOPLEFT", 0, 0) - frame.trackbg:SetPoint("BOTTOMRIGHT", dScroll, "BOTTOMRIGHT", 0, 0) - SkinFrame(frame.trackbg) - end - + if frame:GetThumbTexture() then frame:GetThumbTexture():SetTexture(nil) if not frame.thumbbg then @@ -171,18 +164,23 @@ local function LoadWindow() close:SetScript("OnClick", function() window:Hide() end) header.close = close + addonListBG = CreateFrame("Frame", window:GetName().."_ScrollBackground", window) + addonListBG:SetPoint("TOPLEFT", header, "TOPLEFT", 10, -50) + addonListBG:SetWidth(window:GetWidth()-20) + addonListBG:SetHeight(window:GetHeight()-60) + SkinFrame(addonListBG) + --Create scroll frame (God damn these things are a pain) local scrollFrame = CreateFrame("ScrollFrame", window:GetName().."_ScrollFrame", window, "UIPanelScrollFrameTemplate") - scrollFrame:SetPoint("TOPLEFT", header, "TOPLEFT", 10, -50) - scrollFrame:SetWidth(window:GetWidth()-43) - SkinFrame(scrollFrame) - scrollFrame:SetHeight(window:GetHeight()-60) + scrollFrame:SetPoint("TOPLEFT", addonListBG, "TOPLEFT", 0, -2) + scrollFrame:SetWidth(addonListBG:GetWidth()-25) + scrollFrame:SetHeight(addonListBG:GetHeight()-5) SkinScrollBar(_G[window:GetName().."_ScrollFrameScrollBar"]) scrollFrame:SetFrameLevel(window:GetFrameLevel()+1) scrollFrame.Anchor = CreateFrame("Frame", window:GetName().."_ScrollAnchor", scrollFrame) scrollFrame.Anchor:SetPoint("TOPLEFT", scrollFrame, "TOPLEFT", 0, -3) - scrollFrame.Anchor:SetWidth(scrollFrame:GetWidth()) + scrollFrame.Anchor:SetWidth(window:GetWidth()-40) scrollFrame.Anchor:SetHeight(scrollFrame:GetHeight()) scrollFrame.Anchor:SetFrameLevel(scrollFrame:GetFrameLevel()+1) scrollFrame:SetScrollChild(scrollFrame.Anchor) -- 1.7.9.5