Commit ab82dd96 authored by Blazeflack's avatar Blazeflack

Fixed issue which caused incorrect overlay size when unitframe orientation was...

Fixed issue which caused incorrect overlay size when unitframe orientation was set to "Right" and icon was attached to castbar.

This fixes #1
parent f0dddec6
......@@ -72,12 +72,13 @@ local function SetCastbarSizeAndPosition(unit, unitframe, overlayFrame)
castbar:SetInside(overlayFrame, 0, 0)
else
local iconWidth = cdb.icon and (castbar.ButtonIcon.bg:GetWidth() - unitframe.BORDER) or 0
if(unitframe.ORIENTATION == "LEFT") then
castbar:SetPoint("TOPLEFT", overlayFrame, "TOPLEFT", iconWidth + unitframe.SPACING*3, 0)
castbar:SetPoint("BOTTOMRIGHT", overlayFrame, "BOTTOMRIGHT")
else
castbar:ClearAllPoints()
if(unitframe.ORIENTATION == "RIGHT") then
castbar:SetPoint("TOPLEFT", overlayFrame, "TOPLEFT")
castbar:SetPoint("BOTTOMRIGHT", overlayFrame, "BOTTOMRIGHT", -iconWidth - unitframe.SPACING*3, 0)
else
castbar:SetPoint("TOPLEFT", overlayFrame, "TOPLEFT", iconWidth + unitframe.SPACING*3, 0)
castbar:SetPoint("BOTTOMRIGHT", overlayFrame, "BOTTOMRIGHT")
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment