Commit b42f2b5d authored by nevcairiel's avatar nevcairiel
Browse files

AceGUI-3.0: Label: Avoid zero-height labels more directly

git-svn-id: https://repos.wowace.com/wow/ace3/trunk@1190 5debad98-a965-4143-8383-f471b3509dcf
parent fd6cd3fd
......@@ -55,16 +55,12 @@ local function UpdateImageAnchor(self)
-- no image shown
label:SetPoint("TOPLEFT")
label:SetWidth(width)
-- get the string height, of a space character if we need to
local text = label:GetText()
if not text or text == "" then
label:SetText(" ")
height = label:GetStringHeight()
label:SetText(text)
else
height = label:GetStringHeight()
end
height = label:GetStringHeight()
end
-- avoid zero-height labels, since they can used as spacers
if not height or height == 0 then
height = 1
end
self.resizing = true
......
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