]> git.saurik.com Git - wxWidgets.git/commitdiff
supporting native background on nonownedwindow, see #13032
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 5 Jun 2011 16:08:12 +0000 (16:08 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 5 Jun 2011 16:08:12 +0000 (16:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/nonownedwnd.mm

index 31b96950c630459fb97e4e9553e9e2759f8a6b75..8a93d55f92fb8b69dfa1965b1b41a702963d228b 100644 (file)
@@ -716,8 +716,12 @@ bool wxNonOwnedWindowCocoaImpl::SetTransparent(wxByte alpha)
     return true;
 }
 
-bool wxNonOwnedWindowCocoaImpl::SetBackgroundColour(const wxColour& WXUNUSED(col) )
+bool wxNonOwnedWindowCocoaImpl::SetBackgroundColour(const wxColour& col )
 {
+    [m_macWindow setBackgroundColor:[NSColor colorWithCalibratedRed:(CGFloat) (col.Red() / 255.0)
+                                                             green:(CGFloat) (col.Green() / 255.0)
+                                                              blue:(CGFloat) (col.Blue() / 255.0)
+                                                             alpha:(CGFloat) (col.Alpha() / 255.0)]];
     return true;
 }