diff --git a/api/ui-widgets.lua b/api/ui-widgets.lua index 89506fd0..ed1fc405 100644 --- a/api/ui-widgets.lua +++ b/api/ui-widgets.lua @@ -41,6 +41,9 @@ do -- statusbars point = math.min(height, point) point = math.max(0, point) + -- set point to zero if value and max is zero + if val == 0 then point = 0 end + -- set status bar position/size self.bar:SetPoint("TOPLEFT", self, "TOPLEFT", 0, - height + point) self.bar:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", 0, 0) @@ -57,6 +60,9 @@ do -- statusbars point = math.min(width, point) point = math.max(0, point) + -- set point to zero if value and max is zero + if val == 0 then point = 0 end + -- set status bar position/size self.bar:SetPoint("TOPLEFT", self, "TOPLEFT", 0, 0) self.bar:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", - width + point, 0)