From 014bdcfdca7471d9bb912d9772d02969bf0bc261 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 7 Apr 2019 11:11:47 +0200 Subject: [PATCH] gui: use a more lean way to determine the width Fixes different GetWidth() behaviour of scrollframes in tbc clients --- modules/gui.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gui.lua b/modules/gui.lua index eab78bf2..6c39fb61 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -74,9 +74,9 @@ pfUI:RegisterModule("gui", function () -- basic frame local frame = CreateFrame("Frame", nil, this) + frame:SetWidth(this.parent:GetRight()-this.parent:GetLeft()-20) frame:SetHeight(22) - frame:SetPoint("TOPLEFT", 5, (this.objectCount*-23)-5) - frame:SetWidth(this.parent:GetParent():GetWidth()/this.parent:GetEffectiveScale()-20) + frame:SetPoint("TOPLEFT", this, "TOPLEFT", 5, (this.objectCount*-23)-5) -- populate search index if caption and this and this.GetParent and widget ~= "button" and widget ~= "header" then