From ac2d56c42ed1eed6d7e0eb93d9046c21ce1b000d Mon Sep 17 00:00:00 2001 From: shagu Date: Wed, 17 Apr 2019 20:15:42 +0200 Subject: [PATCH] unitframes: handle negative element spacing --- api/unitframes.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/unitframes.lua b/api/unitframes.lua index b3fcb605..6fe2e233 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -183,6 +183,11 @@ function pfUI.uf:UpdateFrameSize() local height = self.config.height local pheight = self.config.pheight local real_height = height + spacing + pheight + 2*default_border + if spacing ~= abs(spacing) and abs(spacing) > tonumber(pheight) then + real_height = height + spacing = 0 + end + local portrait = 0 if self.config.portrait == "left" or self.config.portrait == "right" then self.portrait:SetWidth(real_height)