Mercurial > traipse_dev
diff orpg/mapper/miniatures.py @ 7:2b9e766f9dee grumpy-goblin
Tests fixes issues with Linux GUI effecting miniatures
Files:
/mapper/miniatures.py
/mapper/miniatures_handler.py
author | sirebral |
---|---|
date | Thu, 16 Jul 2009 14:26:50 -0500 |
parents | 4385a7d0efd1 |
children | 78407d627cba |
line wrap: on
line diff
--- a/orpg/mapper/miniatures.py Wed Jul 15 04:06:37 2009 -0500 +++ b/orpg/mapper/miniatures.py Thu Jul 16 14:26:50 2009 -0500 @@ -494,8 +494,20 @@ self.log.log("Enter miniature_layer", ORPG_DEBUG) self.settings = self.canvas.settings layer_base.__init__(self) + + self.id = -1 #added. + self.miniatures = [] self.serial_number = 0 + + # Set the font of the labels to be the same as the chat window + # only smaller. + font_size = int(self.settings.get_setting('defaultfontsize')) + if (font_size >= 10): + font_size -= 2 + self.label_font = wx.Font(font_size, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, + False, self.settings.get_setting('defaultfont')) + self.log.log("Exit miniature_layer", ORPG_DEBUG) def next_serial(self): @@ -589,6 +601,9 @@ def layerDraw(self, dc, topleft, size): self.log.log("Enter miniature_layer->layerDraw(self, dc, topleft, size)", ORPG_DEBUG) + + dc.SetFont(self.label_font) + sorted_miniatures = self.miniatures[:] sorted_miniatures.sort(cmp_zorder) for m in sorted_miniatures: