diff Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua @ 17:3000eccbf1a0 v7.3.0.017

- ToC Update.
author Tercio
date Sat, 02 Sep 2017 14:10:48 -0300
parents fc346da3afd9
children
line wrap: on
line diff
--- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua	Tue Mar 28 19:37:34 2017 -0300
+++ b/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua	Sat Sep 02 14:10:48 2017 -0300
@@ -2,7 +2,7 @@
 Label Widget
 Displays text and optionally an icon.
 -------------------------------------------------------------------------------]]
-local Type, Version = "Label", 23
+local Type, Version = "Label", 24
 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
@@ -78,6 +78,8 @@
 		self:SetImageSize(16, 16)
 		self:SetColor()
 		self:SetFontObject()
+		self:SetJustifyH("LEFT")
+		self:SetJustifyV("TOP")
 
 		-- reset the flag
 		self.resizing = nil
@@ -134,6 +136,14 @@
 		self.image:SetHeight(height)
 		UpdateImageAnchor(self)
 	end,
+
+	["SetJustifyH"] = function(self, justifyH)
+		self.label:SetJustifyH(justifyH)
+	end,
+
+	["SetJustifyV"] = function(self, justifyV)
+		self.label:SetJustifyV(justifyV)
+	end,
 }
 
 --[[-----------------------------------------------------------------------------
@@ -144,9 +154,6 @@
 	frame:Hide()
 
 	local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontHighlightSmall")
-	label:SetJustifyH("LEFT")
-	label:SetJustifyV("TOP")
-
 	local image = frame:CreateTexture(nil, "BACKGROUND")
 
 	-- create widget