From 1ab26f6569fb137cd6aa3b52dfdef5dc2854c37f Mon Sep 17 00:00:00 2001 From: Ryan <80087248+RyanLua@users.noreply.github.com> Date: Wed, 5 Apr 2023 15:55:28 -0700 Subject: [PATCH] Updated padding algorithm --- src/Shime.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Shime.lua b/src/Shime.lua index e4ab18c..1b3bd16 100644 --- a/src/Shime.lua +++ b/src/Shime.lua @@ -64,9 +64,9 @@ local function createShimmer(parent: GuiObject): Frame if frame.Parent:FindFirstChildOfClass("UIPadding") then local padding = frame.Parent:FindFirstChildOfClass("UIPadding") frame.Size = UDim2.new( - 1, + 1 / (1 - (padding.PaddingLeft.Scale + padding.PaddingRight.Scale)), padding.PaddingLeft.Offset + padding.PaddingRight.Offset, - 1, + 1 / (1 - padding.PaddingTop.Scale - padding.PaddingBottom.Scale), padding.PaddingTop.Offset + padding.PaddingBottom.Offset ) end