Quantcast

fixing the artifact bar

Mikeprod [11-29-16 - 23:36]
fixing the artifact bar

The bar was not properly showing when padding changed and on load some times.
Filename
modules/talent.lua
diff --git a/modules/talent.lua b/modules/talent.lua
index 96aa3a6..fc85aaf 100644
--- a/modules/talent.lua
+++ b/modules/talent.lua
@@ -98,7 +98,11 @@ function TalentModule:Refresh()
     else
       self.specBar:SetStatusBarColor(db.color.normal.r, db.color.normal.g, db.color.normal.b, db.color.normal.a)
     end
-    self.specBar:SetSize(self.specText:GetStringWidth(), (iconSize - textHeight - 2))
+    local barHeight = iconSize - textHeight - 2
+    if barHeight < 2 then
+      barHeight = 2
+    end
+    self.specBar:SetSize(self.specText:GetStringWidth(), barHeight)
     self.specBar:SetPoint('BOTTOMLEFT', self.specIcon, 'BOTTOMRIGHT', 5, 0)

     self.specBarBg:SetAllPoints()