wxPython Merge #2 of 2.4 branch --> HEAD (branch tag: wxPy_2_4_merge_2)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-07-02 23:13:10 +00:00
parent e234d4c9b7
commit 1fded56b37
535 changed files with 48899 additions and 20067 deletions

View File

@@ -26,7 +26,8 @@ class wxGenStaticText(wxPyControl):
pos = wxDefaultPosition, size = wxDefaultSize,
style = 0,
name = "genstattext"):
wxPyControl.__init__(self, parent, ID, pos, size, style, wxDefaultValidator, name)
wxPyControl.__init__(self, parent, ID, pos, size, style|wxNO_BORDER,
wxDefaultValidator, name)
wxPyControl.SetLabel(self, label) # don't check wxST_NO_AUTORESIZE yet
self.SetPosition(pos)
@@ -35,10 +36,10 @@ class wxGenStaticText(wxPyControl):
font = wxSystemSettings_GetSystemFont(wxSYS_DEFAULT_GUI_FONT)
wxPyControl.SetFont(self, font) # same here
clr = parent.GetBackgroundColour()
if not clr.Ok():
clr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE)
self.SetBackgroundColour(clr)
self.defBackClr = parent.GetBackgroundColour()
if not self.defBackClr.Ok():
self.defBackClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_3DFACE)
self.SetBackgroundColour(self.defBackClr)
clr = parent.GetForegroundColour()
if not clr.Ok():
@@ -105,7 +106,14 @@ class wxGenStaticText(wxPyControl):
width, height = self.GetClientSize()
if not width or not height:
return
dc.SetBackground(wxBrush(self.GetBackgroundColour(), wxSOLID))
clr = self.GetBackgroundColour()
backBrush = wxBrush(clr, wxSOLID)
if wxPlatform == "__WXMAC__" and clr == self.defBackClr:
# if colour still the default the use the striped background on Mac
backBrush.SetMacTheme(1) # 1 == kThemeBrushDialogBackgroundActive
dc.SetBackground(backBrush)
dc.SetTextForeground(self.GetForegroundColour())
dc.Clear()
dc.SetFont(self.GetFont())