Quantcast

Fixed font issues with clock

Adrian L Lange [09-26-09 - 00:56]
Fixed font issues with clock
Filename
Config.lua
pMinimap.lua
diff --git a/Config.lua b/Config.lua
index 8d1b9d0..07d0550 100644
--- a/Config.lua
+++ b/Config.lua
@@ -3,9 +3,15 @@
 local group, slider, dropdown, checkbox = LibStub('tekKonfig-Group'), LibStub('tekKonfig-Slider'), LibStub('tekKonfig-Dropdown'), LibStub('tekKonfig-Checkbox')

 local function updateStrings()
-	MiniMapMailText:SetFont(SharedMedia:Fetch('font', pMinimapDB.font), pMinimapDB.fontsize, pMinimapDB.fontflag)
-	MinimapZoneText:SetFont(SharedMedia:Fetch('font', pMinimapDB.font), pMinimapDB.fontsize, pMinimapDB.fontflag)
-	MinimapCoordinatesText:SetFont(SharedMedia:Fetch('font', pMinimapDB.font), pMinimapDB.fontsize, pMinimapDB.fontflag)
+	local font, size, flag = SharedMedia:Fetch('font', pMinimapDB.font), pMinimapDB.fontsize, pMinimapDB.fontflag
+
+	MiniMapMailText:SetFont(font, size, flag)
+	MinimapZoneText:SetFont(font, size, flag)
+	MinimapCoordinatesText:SetFont(font, size, flag)
+
+	if(pMinimapDB.clock) then
+		TimeManagerClockTicker:SetFont(font, size, flag)
+	end
 end

 local function dropStrata(orig)
@@ -159,6 +165,7 @@ local function modules(self)
 			end
 		else
 			TimeManagerClockButton:Hide()
+			TimeManagerClockButton:SetScript('OnShow', pMinimap.ClockHook)
 		end

 		if(pMinimapDB.coordinates) then
diff --git a/pMinimap.lua b/pMinimap.lua
index 8cbe7b7..0859ce0 100644
--- a/pMinimap.lua
+++ b/pMinimap.lua
@@ -33,6 +33,10 @@ local defaults = {
 	coordinatesdecimals = 0,
 }

+function addon:ClockHook(self)
+	self:Hide()
+end
+
 function addon:Clock()
 	TimeManagerClockButton:GetRegions():Hide()
 	TimeManagerClockButton:ClearAllPoints()
@@ -226,7 +230,7 @@ function addon:ADDON_LOADED(event, name)

 		self:Style()
 	elseif(name == 'Blizzard_TimeManager') then
-		TimeManagerClockButton:SetScript('OnShow', function(self) self:Hide() end)
+		TimeManagerClockButton:SetScript('OnShow', self.ClockHook)
 		TimeManagerClockButton:Hide()

 		if(pMinimapDB.clock) then