Quantcast

Some failsafes on size. This fixes #320

Darthpred [09-05-16 - 07:08]
Some failsafes on size. This fixes #320
Filename
ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua
diff --git a/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua b/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua
index fd4b90a..d5ae4d9 100644
--- a/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua
+++ b/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua
@@ -903,12 +903,12 @@ end

 function CA:UpdateIlvlFont()
 	local db = E.db.sle.Armory.Character.ItemLevel
-	_G["CharacterStatsPane"].ItemLevelFrame.Value:FontTemplate(E.LSM:Fetch('font', db.font), db.size, db.outline)
-	_G["CharacterStatsPane"].ItemLevelFrame:SetHeight(db.size + 4)
-	_G["CharacterStatsPane"].ItemLevelFrame.Background:SetHeight(db.size + 4)
+	_G["CharacterStatsPane"].ItemLevelFrame.Value:FontTemplate(E.LSM:Fetch('font', db.font), db.size or 12, db.outline)
+	_G["CharacterStatsPane"].ItemLevelFrame:SetHeight((db.size or 12) + 4)
+	_G["CharacterStatsPane"].ItemLevelFrame.Background:SetHeight((db.size or 12) + 4)
 	if _G["CharacterStatsPane"].ItemLevelFrame.leftGrad then
-		_G["CharacterStatsPane"].ItemLevelFrame.leftGrad:SetHeight(db.size + 4)
-		_G["CharacterStatsPane"].ItemLevelFrame.rightGrad:SetHeight(db.size + 4)
+		_G["CharacterStatsPane"].ItemLevelFrame.leftGrad:SetHeight((db.size or 12) + 4)
+		_G["CharacterStatsPane"].ItemLevelFrame.rightGrad:SetHeight((db.size or 12) + 4)
 	end
 end