keeping opaqueness and backgroundcolor in synch with bgstyle

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2011-01-26 18:49:02 +00:00
parent ca12c122df
commit 6c894d4e65

View File

@ -477,7 +477,14 @@ void wxWidgetIPhoneImpl::SetBackgroundColour( const wxColour &col )
bool wxWidgetIPhoneImpl::SetBackgroundStyle(wxBackgroundStyle style) 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) 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(); CGContextRef context = (CGContextRef) UIGraphicsGetCurrentContext();
CGContextSaveGState( context ); CGContextSaveGState( context );
// draw background // draw background
/*
CGContextSetFillColorWithColor( context, GetWXPeer()->GetBackgroundColour().GetCGColor()); CGContextSetFillColorWithColor( context, GetWXPeer()->GetBackgroundColour().GetCGColor());
CGContextFillRect(context, *rect ); CGContextFillRect(context, *rect );
*/
GetWXPeer()->MacSetCGContextRef( context ); GetWXPeer()->MacSetCGContextRef( context );
GetWXPeer()->GetUpdateRegion() = GetWXPeer()->GetUpdateRegion() =