From: Robert Roebling Date: Mon, 17 Dec 2001 10:06:33 +0000 (+0000) Subject: MacOS 9 seems to clear the background itself, too. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3355efa93c7ef81088344b7ddbc7355c4730bb57 MacOS 9 seems to clear the background itself, too. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/stattext.cpp b/src/mac/carbon/stattext.cpp index 62e095f5fa..39a5e39b06 100644 --- a/src/mac/carbon/stattext.cpp +++ b/src/mac/carbon/stattext.cpp @@ -128,13 +128,10 @@ void wxStaticText::OnDraw( wxDC &dc ) if (m_width <= 0 || m_height <= 0) return; - wxString paragraph; + wxString paragraph; int i = 0 ; wxString text = m_label; - int major,minor; - wxGetOsVersion( &major, &minor ); - PrepareDC(dc); bool doClear = true ; @@ -152,41 +149,23 @@ void wxStaticText::OnDraw( wxDC &dc ) break ; } - if (major < 10) - { - if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) || parent->IsKindOf( CLASSINFO( wxTabCtrl ) )) - { - if ( ((wxControl*)parent)->GetMacControl() ) { - Rect rect = { -10000 , -10000 , 10000 , 10000 } ; // MacOS X was having a coord rollover - if ( DrawThemeTabPane != (void*)kUnresolvedCFragSymbolAddress ) - { - DrawThemeTabPane ( &rect, kThemeStateActive); - doClear = false ; - } - } - break ; - } - } - parent = parent->GetParent() ; } } } - if ( (major < 10) && doClear ) - dc.Clear() ; - while (i < text.Length()) { - paragraph += text[i]; + paragraph += text[i]; - if (text[i] == 13 || text[i] == 10) - DrawParagraph(dc, paragraph); + if (text[i] == 13 || text[i] == 10) + DrawParagraph(dc, paragraph); - ++i; - } - if (paragraph.Length() > 0) - DrawParagraph(dc, paragraph); + ++i; + } + + if (paragraph.Length() > 0) + DrawParagraph(dc, paragraph); } void wxStaticText::OnPaint( wxPaintEvent &event ) diff --git a/src/mac/stattext.cpp b/src/mac/stattext.cpp index 62e095f5fa..39a5e39b06 100644 --- a/src/mac/stattext.cpp +++ b/src/mac/stattext.cpp @@ -128,13 +128,10 @@ void wxStaticText::OnDraw( wxDC &dc ) if (m_width <= 0 || m_height <= 0) return; - wxString paragraph; + wxString paragraph; int i = 0 ; wxString text = m_label; - int major,minor; - wxGetOsVersion( &major, &minor ); - PrepareDC(dc); bool doClear = true ; @@ -152,41 +149,23 @@ void wxStaticText::OnDraw( wxDC &dc ) break ; } - if (major < 10) - { - if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) || parent->IsKindOf( CLASSINFO( wxTabCtrl ) )) - { - if ( ((wxControl*)parent)->GetMacControl() ) { - Rect rect = { -10000 , -10000 , 10000 , 10000 } ; // MacOS X was having a coord rollover - if ( DrawThemeTabPane != (void*)kUnresolvedCFragSymbolAddress ) - { - DrawThemeTabPane ( &rect, kThemeStateActive); - doClear = false ; - } - } - break ; - } - } - parent = parent->GetParent() ; } } } - if ( (major < 10) && doClear ) - dc.Clear() ; - while (i < text.Length()) { - paragraph += text[i]; + paragraph += text[i]; - if (text[i] == 13 || text[i] == 10) - DrawParagraph(dc, paragraph); + if (text[i] == 13 || text[i] == 10) + DrawParagraph(dc, paragraph); - ++i; - } - if (paragraph.Length() > 0) - DrawParagraph(dc, paragraph); + ++i; + } + + if (paragraph.Length() > 0) + DrawParagraph(dc, paragraph); } void wxStaticText::OnPaint( wxPaintEvent &event )