]> git.saurik.com Git - wxWidgets.git/blob - wxPython/tests/test_macbrush.py
removed extra semicolons (patch #1700459; fixes compilation with gcc's -pedantic...
[wxWidgets.git] / wxPython / tests / test_macbrush.py
1 import wx
2
3
4 class TestPanel(wx.Panel):
5 def __init__(self, parent):
6 wx.Panel.__init__(self, parent)
7 self.Bind(wx.EVT_PAINT, self.OnPaint)
8
9 def OnPaint(self, evt):
10 dc = wx.PaintDC(self)
11 br = wx.Brush("light blue")
12 dc.SetBrush(br)
13 dc.DrawRectangle(10,10, 50,50)
14
15 br = wx.Brush(self.GetBackgroundColour())
16 br.MacSetTheme(1)
17 dc.SetBrush(br)
18 dc.DrawRectangle(80,10, 50,50)
19
20
21 app = wx.App(False)
22 frm = wx.Frame(None)
23 pnl = TestPanel(frm)
24 frm.Show()
25 app.MainLoop()