equal
deleted
inserted
replaced
1 |
1 |
2 import os |
2 import os |
3 import types |
3 import types |
4 |
4 |
5 import wx |
5 import wx |
6 import wx.lib.buttons |
|
7 |
6 |
8 from EditorPanel import EditorPanel |
7 from EditorPanel import EditorPanel |
9 |
8 |
10 from IDEFrame import TITLE, FILEMENU, PROJECTTREE, PAGETITLES |
9 from IDEFrame import TITLE, FILEMENU, PROJECTTREE, PAGETITLES |
11 |
10 |
32 |
31 |
33 CWD = os.path.split(os.path.realpath(__file__))[0] |
32 CWD = os.path.split(os.path.realpath(__file__))[0] |
34 |
33 |
35 def Bpath(*args): |
34 def Bpath(*args): |
36 return os.path.join(CWD,*args) |
35 return os.path.join(CWD,*args) |
37 |
|
38 # Patch wx.lib.imageutils so that gray is supported on alpha images |
|
39 import wx.lib.imageutils |
|
40 from wx.lib.imageutils import grayOut as old_grayOut |
|
41 def grayOut(anImage): |
|
42 if anImage.HasAlpha(): |
|
43 AlphaData = anImage.GetAlphaData() |
|
44 else : |
|
45 AlphaData = None |
|
46 |
|
47 old_grayOut(anImage) |
|
48 |
|
49 if AlphaData is not None: |
|
50 anImage.SetAlphaData(AlphaData) |
|
51 |
|
52 wx.lib.imageutils.grayOut = grayOut |
|
53 |
36 |
54 class GenBitmapTextButton(wx.lib.buttons.GenBitmapTextButton): |
37 class GenBitmapTextButton(wx.lib.buttons.GenBitmapTextButton): |
55 def _GetLabelSize(self): |
38 def _GetLabelSize(self): |
56 """ used internally """ |
39 """ used internally """ |
57 w, h = self.GetTextExtent(self.GetLabel()) |
40 w, h = self.GetTextExtent(self.GetLabel()) |