Commit 36b27d11 authored by nevcairiel's avatar nevcairiel
Browse files

AceGUI-3.0: Label: Top-Align the image when the text has more height then the...

AceGUI-3.0: Label: Top-Align the image when the text has more height then the image (Addendum to Ticket #301)

git-svn-id: https://repos.wowace.com/wow/ace3/trunk@1053 5debad98-a965-4143-8383-f471b3509dcf
parent 6f5129a8
......@@ -2,7 +2,7 @@
Label Widget
Displays text and optionally an icon.
-------------------------------------------------------------------------------]]
local Type, Version = "Label", 22
local Type, Version = "Label", 23
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
......@@ -43,7 +43,11 @@ local function UpdateImageAnchor(self)
else
-- image on the left
image:SetPoint("TOPLEFT")
label:SetPoint("LEFT", image, "RIGHT", 4, 0)
if image:GetHeight() > label:GetHeight() then
label:SetPoint("LEFT", image, "RIGHT", 4, 0)
else
label:SetPoint("TOPLEFT", image, "TOPRIGHT", 4, 0)
end
label:SetWidth(width - imagewidth - 4)
height = max(image:GetHeight(), label:GetHeight())
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