From 47a7b4c686c09939614a03293041853ed11c37bd Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Fri, 24 Jul 2026 16:08:36 -0500 Subject: [PATCH] Simplify totems frame sizing Replace separate SetWidth/SetHeight calls with a single SetSize using precomputed 'thickness' and 'length' values. This refactors the totems layout math into clearer variables (thickness = iconsize + spacing*2, length = thickness * count) for horizontal and vertical directions, improving readability and maintainability without changing behavior. --- modules/totems.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/totems.lua b/modules/totems.lua index e536b797..1f8f421d 100644 --- a/modules/totems.lua +++ b/modules/totems.lua @@ -68,12 +68,12 @@ pfUI:RegisterModule("totems", function () count = count and count > 0 and count or MAX_TOTEMS + local thickness = self.iconsize + self.spacing*2 + local length = thickness * count if pfUI_config.totems.direction == "HORIZONTAL" then - self:SetHeight(self.iconsize + self.spacing*2) - self:SetWidth(self.spacing*2 + self.iconsize + (count-1)*(self.iconsize + self.spacing*2)) + self:SetSize(length, thickness) else - self:SetWidth(self.iconsize + self.spacing*2) - self:SetHeight(self.spacing*2 + self.iconsize + (count-1)*(self.iconsize + self.spacing*2)) + self:SetSize(thickness, length) end end