Quantcast

Adjust the portrait height when power is missing too

Adrian L Lange [08-23-14 - 16:15]
Adjust the portrait height when power is missing too
Filename
oUF_P3lim.lua
diff --git a/oUF_P3lim.lua b/oUF_P3lim.lua
index 69cdfb9..d09ed61 100644
--- a/oUF_P3lim.lua
+++ b/oUF_P3lim.lua
@@ -15,7 +15,11 @@ local GLOW = {
 }

 local function PostUpdatePower(element, unit, cur, max)
-	element.__owner.Health:SetHeight(max ~= 0 and 20 or 22)
+	local parent = element.__owner
+	local height = max ~= 0 and 20 or 22
+	parent.Health:SetHeight(height)
+	parent.Portrait.scrollFrame:SetHeight(height)
+	parent.Portrait.scrollFrame:GetScrollChild():SetHeight(height)
 end

 local function PostUpdateHealth(element, unit, cur, max)