Change which image is used in the taskbar

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2004-09-29 21:52:45 +00:00
parent bbfc7289d6
commit 49090f6f10
3 changed files with 32 additions and 2 deletions

View File

@ -995,7 +995,7 @@ class DemoTaskBarIcon(wx.TaskBarIcon):
if "wxMSW" in wx.PlatformInfo:
img.Scale(16, 16)
elif "wxGTK" in wx.PlatformInfo:
img.Scale(22, 22)
img.Scale(20, 20)
# wxMac can be any size upto 128.128....
icon = wx.IconFromBitmap(img.ConvertToBitmap() )
return icon
@ -1018,7 +1018,7 @@ class DemoTaskBarIcon(wx.TaskBarIcon):
def OnTaskBarChange(self, evt):
icon = self.MakeIcon(images.getRobinImage())
icon = self.MakeIcon(images.getBlom10MaskedImage())
self.SetIcon(icon, "This is a new icon")

View File

@ -79,6 +79,8 @@ command_lines = [
"-a -u -n Blom14 bmp_source/toblom14.png images.py",
"-a -u -n Blom15 bmp_source/toblom15.png images.py",
"-a -u -n Blom10Masked -m #FFFFFF bmp_source/toblom10.png images.py",
" -u -c bmp_source/001.png throbImages.py",
"-a -u -c bmp_source/002.png throbImages.py",

View File

@ -5887,3 +5887,31 @@ def getBlom15Image():
stream = cStringIO.StringIO(getBlom15Data())
return ImageFromStream(stream)
#----------------------------------------------------------------------
def getBlom10MaskedData():
return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 \x00\x00\x00 \x08\x06\x00\
\x00\x00szz\xf4\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\x01iID\
ATx\x9c\xbd\x97Q\xb2\xc3 \x08EA\xdf\x92XS]S\xb2&\xb7\x94\xd8/:\x84J@M\x1f3\
\xfdI\xb5\xf7\x18.P\x11S\x86H\xb4\xf3h\xa1\x85*0e\xbc\xfd\xde\x03\x88\x08\
\xd7Z\x81\x88\xa0\xd6zyND.\x88\t0{b\x19\xdb\xb6\x01\x00@)\xc5\x84\xe8\x02H\
\xf1\xba\xbdBbTv\x17"\x040#\xeeA\\\x04\x15DzJ<\xbaG\xa76\xf5\x16\xcd\x88G\
\xf6\xb2I%\xc4\x07\xe0\t\xd3y!\xab\x82\xe3\xe3\x01\x06\x88\x9c^\xe6\xdaZ\xef\
\xf9\x81\xbd\xf0\xe7\xaauB\x8aR\xd9\xa7R\xd6\xce\xa3a\xca\xd8\xf5\xc0(L\xc4\
\xfdV,\x030D\xe4\xd9\xcf\x00V\xe2\x16\x80\xca\xbe\xf4z\x97\x00Xx\xa5\'\x0c\
\x01pYDJ,\x1a\x91\xfd\xdd2\x8c\x96\xd6\x13\xb0\x17\x00L\x19\xa3\x1d\x91\xca~\
\x19,T\xf6\xa6\xfb\x83\x04\xb3\xbc45\x8e\xb5xo\x9f\x16\xef\xf5\x0bL\x19\xcdN\
(<\xd1F\x9a\xcdh*\xbe\x00\xb8EJ\x10\xeb\xf5F\xa3\x07\xc5\x1a\xff\xd6\x88,\
\xe8\xa9a\xb4*,\xdfp\x08\x80\xd3\xb0\n3\xf4\xa7T.n\xe7\xd1t\x1eu%Xk,a\x8e\
\xae\x07\xb8\x1f\xf0\xc7\x9av\xde\x1aO\x1c\xc0\xb9\x17\xac\xb4\xe2\xc8\xe9\
\x01&\xab\xc0+\xc3\xa88\xc0`\x15\xfcbB\xde\xde\rg\xd2\xc0\xe6\xd4F\x9e\x02`\
\x08\x00{&|\xfd\xa0\xaa\x8c\xe5\xdb\xb1\x06\x89\x86\x9c\xacw\x10o\xea\r\xf9&\
G\x80\r\xe3\x00\x00\x00\x00IEND\xaeB`\x82'
def getBlom10MaskedBitmap():
return BitmapFromImage(getBlom10MaskedImage())
def getBlom10MaskedImage():
stream = cStringIO.StringIO(getBlom10MaskedData())
return ImageFromStream(stream)