Comment 1 for bug 551183

Revision history for this message
Stani (stani) wrote :

Committed revision 1930.

$ bzr diff
=== modified file 'phatch/lib/pyWx/droplet.py'
--- phatch/lib/pyWx/droplet.py 2010-03-29 15:09:45 +0000
+++ phatch/lib/pyWx/droplet.py 2010-03-29 20:08:29 +0000
@@ -79,9 +79,13 @@
         w, h = self.bmp.GetWidth(), self.bmp.GetHeight()
         self.SetClientSize((w, h))

- if wx.Platform != "__WXMAC__" and tooltip:
- #wxMac clips the tooltip to the window shape, YUCK!!!
- self.SetToolTipString(tooltip)
+ if wx.Platform != "__WXMAC__":
+ self.font_size = 7
+ if tooltip:
+ #wxMac clips the tooltip to the window shape, YUCK!!!
+ self.SetToolTipString(tooltip)
+ else:
+ self.font_size = 12
         if wx.Platform == "__WXGTK__":
             #wxGTK requires that the window be created before you can
             #set its shape, so delay the call to SetWindowShape until
@@ -124,7 +128,7 @@
         dc = wx.PaintDC(self)
         dc.DrawBitmap(self.bmp, 0, 0, True)
         if self.label:
- font = wx.Font(7, wx.NORMAL, wx.NORMAL, wx.NORMAL)
+ font = wx.Font(self.font_size, wx.SWISS, wx.NORMAL, wx.NORMAL)
             dc.SetFont(font)
             dc.SetTextForeground(self.label_color)
             dc.DrawRotatedText(self.label, self.label_x, self.label_y,