test for mac theme brush
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
25
wxPython/tests/test_macbrush.py
Normal file
25
wxPython/tests/test_macbrush.py
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import wx
|
||||||
|
|
||||||
|
|
||||||
|
class TestPanel(wx.Panel):
|
||||||
|
def __init__(self, parent):
|
||||||
|
wx.Panel.__init__(self, parent)
|
||||||
|
self.Bind(wx.EVT_PAINT, self.OnPaint)
|
||||||
|
|
||||||
|
def OnPaint(self, evt):
|
||||||
|
dc = wx.PaintDC(self)
|
||||||
|
br = wx.Brush("light blue")
|
||||||
|
dc.SetBrush(br)
|
||||||
|
dc.DrawRectangle(10,10, 50,50)
|
||||||
|
|
||||||
|
br = wx.Brush(self.GetBackgroundColour())
|
||||||
|
br.MacSetTheme(1)
|
||||||
|
dc.SetBrush(br)
|
||||||
|
dc.DrawRectangle(80,10, 50,50)
|
||||||
|
|
||||||
|
|
||||||
|
app = wx.App(False)
|
||||||
|
frm = wx.Frame(None)
|
||||||
|
pnl = TestPanel(frm)
|
||||||
|
frm.Show()
|
||||||
|
app.MainLoop()
|
Reference in New Issue
Block a user