]> git.saurik.com Git - wxWidgets.git/commitdiff
keeping opaqueness and backgroundcolor in synch with bgstyle
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 26 Jan 2011 18:49:02 +0000 (18:49 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 26 Jan 2011 18:49:02 +0000 (18:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/iphone/window.mm

index 6fbf4b9b4c0afef43f1b6dba2d64f965522b44f5..83e902bbe1370494604cd5c43edbe48d291cb680 100644 (file)
@@ -477,7 +477,14 @@ void wxWidgetIPhoneImpl::SetBackgroundColour( const wxColour &col )
 
 bool wxWidgetIPhoneImpl::SetBackgroundStyle(wxBackgroundStyle style) 
 {
-    [m_osxView setOpaque: (style == wxBG_STYLE_PAINT) ];
+    if ( style == wxBG_STYLE_PAINT )
+        [m_osxView setOpaque: YES ];
+    else
+    {
+        [m_osxView setOpaque: NO ];
+        m_osxView.backgroundColor = [UIColor clearColor];
+    }
+    return true;
 }
 
 void wxWidgetIPhoneImpl::SetLabel(const wxString& title, wxFontEncoding encoding)
@@ -681,10 +688,10 @@ void wxWidgetIPhoneImpl::drawRect(CGRect* rect, WXWidget slf, void *WXUNUSED(_cm
     CGContextRef context = (CGContextRef) UIGraphicsGetCurrentContext();
     CGContextSaveGState( context );
     // draw background
-
+/*
     CGContextSetFillColorWithColor( context, GetWXPeer()->GetBackgroundColour().GetCGColor());
     CGContextFillRect(context, *rect );
-
+*/
     GetWXPeer()->MacSetCGContextRef( context );
 
     GetWXPeer()->GetUpdateRegion() =