font and font_size added to config and used in HUD.

This commit is contained in:
Ray
2008-12-17 21:57:05 -05:00
parent e0105c5ed1
commit bb9f85233e
2 changed files with 41 additions and 14 deletions
+8 -2
View File
@@ -61,7 +61,13 @@ class Hud:
self.stat_windows = {}
self.popup_windows = {}
self.aux_windows = []
self.font = pango.FontDescription("Sans 7")
(font, font_size) = config.get_default_font(self.table.site)
print "font = ", font, "size = ", font_size
if font == None or font_size == None:
self.font = pango.FontDescription("Sans 7")
else:
print "Setting font to ", font + " " + font_size
self.font = pango.FontDescription(font + " " + font_size)
# Set up a main window for this this instance of the HUD
self.main_window = gtk.Window()
@@ -401,7 +407,7 @@ class Stat_Window:
self.e_box[r][c].add(self.label[r][c])
self.e_box[r][c].connect("button_press_event", self.button_press_cb)
font = pango.FontDescription("Sans 7")
# font = pango.FontDescription(self.font)
self.label[r][c].modify_font(font)
self.window.set_opacity(parent.colors['hudopacity'])