- 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,
Committed revision 1930.
$ bzr diff lib/pyWx/ droplet. py' lib/pyWx/ droplet. py 2010-03-29 15:09:45 +0000 lib/pyWx/ droplet. py 2010-03-29 20:08:29 +0000 GetWidth( ), self.bmp. GetHeight( )
self. SetClientSize( (w, h))
=== modified file 'phatch/
--- phatch/
+++ phatch/
@@ -79,9 +79,13 @@
w, h = self.bmp.
- if wx.Platform != "__WXMAC__" and tooltip: String( tooltip) String( tooltip)
dc.DrawBitmap (self.bmp, 0, 0, True) self.font_ size, wx.SWISS, wx.NORMAL, wx.NORMAL)
dc. SetFont( font)
dc. SetTextForegrou nd(self. label_color)
dc. DrawRotatedText (self.label, self.label_x, self.label_y,
- #wxMac clips the tooltip to the window shape, YUCK!!!
- self.SetToolTip
+ if wx.Platform != "__WXMAC__":
+ self.font_size = 7
+ if tooltip:
+ #wxMac clips the tooltip to the window shape, YUCK!!!
+ self.SetToolTip
+ 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)
if self.label:
- font = wx.Font(7, wx.NORMAL, wx.NORMAL, wx.NORMAL)
+ font = wx.Font(