Screw WX, also this removes the 'easter egg'
This commit is contained in:
@@ -18,37 +18,9 @@ class BlankPage(wx.Panel):
|
||||
self.parent = parent
|
||||
|
||||
self.parent.Bind(gui.chromeTabs.EVT_NOTEBOOK_PAGE_CHANGED, self.pageChanged)
|
||||
self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBk)
|
||||
self.Bind(wx.EVT_PAINT, self.OnPaint)
|
||||
self.Bind(wx.EVT_SIZE, self.OnSize)
|
||||
self.Bind(wx.EVT_RIGHT_DCLICK, self.OnRightDClick)
|
||||
|
||||
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=None))
|
||||
|
||||
def OnRightDClick(self, event):
|
||||
self.showLogo = False if self.showLogo else True
|
||||
self.Refresh()
|
||||
event.Skip()
|
||||
|
||||
def OnSize(self, event):
|
||||
self.Refresh()
|
||||
event.Skip()
|
||||
|
||||
def OnEraseBk(self, event):
|
||||
pass
|
||||
|
||||
def OnPaint(self, event):
|
||||
rect = self.GetRect()
|
||||
|
||||
windowColor = wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW)
|
||||
mdc = wx.BufferedPaintDC(self)
|
||||
mdc.SetBrush(wx.Brush(windowColor))
|
||||
mdc.Clear()
|
||||
x = (rect.width - self.bkbmp.GetWidth()) / 2
|
||||
y = (rect.height - self.bkbmp.GetHeight()) / 2
|
||||
if self.showLogo:
|
||||
mdc.DrawBitmap(self.bkbmp, x, y)
|
||||
|
||||
def Destroy(self):
|
||||
self.parent.Unbind(gui.chromeTabs.EVT_NOTEBOOK_PAGE_CHANGED, handler=self.pageChanged)
|
||||
wx.Panel.Destroy(self)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 74 KiB |
Reference in New Issue
Block a user