Do not use alpha channel for inactive tabs in pfnotebook

This commit is contained in:
HomeWorld
2010-12-03 15:10:24 +02:00
parent b7d959ed62
commit ff35e213fb

View File

@@ -997,8 +997,7 @@ class PFTabsContainer(wx.Panel):
selected = None
selpos = 0
selWidth = selHeight = 0
selColor = self.CalculateColor(wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW), 0x66)
startColor = self.leftColor = self.CalculateColor(wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW), 0x50)
tabsWidth = 0
@@ -1015,17 +1014,13 @@ class PFTabsContainer(wx.Panel):
width = tab.tabWidth - 6
posx, posy = tab.GetPosition()
if not tab.IsSelected():
# if not 'wxMac' in wx.PlatformInfo:
mdc.DrawBitmap(self.efxBmp, posx, posy, True )
img = tab.Render().ConvertToImage()
img = img.AdjustChannels(1, 1, 1, 0.8)
bmp = wx.BitmapFromImage(img)
bmp = tab.Render()
mdc.DrawBitmap(bmp, posx, posy, True)
else:
selected = tab
if selected:
posx, posy = selected.GetPosition()
# if not 'wxMac' in wx.PlatformInfo:
mdc.DrawBitmap(self.efxBmp, posx, posy, True)
bmp = selected.Render()
if self.dragging:
@@ -1043,8 +1038,6 @@ class PFTabsContainer(wx.Panel):
offset = 0
r1 = wx.Rect(0,self.containerHeight -1,selpos,1)
r2 = wx.Rect(0, self.containerHeight -1 , self.width,1)
# mdc.GradientFillLinear(r1, startColor, selColor, wx.EAST)
# mdc.GradientFillLinear(r2, selColor, startColor, wx.EAST)
def OnErase(self, event):
pass