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
This commit is contained in:
@@ -128,13 +128,10 @@ void wxStaticText::OnDraw( wxDC &dc )
|
|||||||
if (m_width <= 0 || m_height <= 0)
|
if (m_width <= 0 || m_height <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxString paragraph;
|
wxString paragraph;
|
||||||
int i = 0 ;
|
int i = 0 ;
|
||||||
wxString text = m_label;
|
wxString text = m_label;
|
||||||
|
|
||||||
int major,minor;
|
|
||||||
wxGetOsVersion( &major, &minor );
|
|
||||||
|
|
||||||
PrepareDC(dc);
|
PrepareDC(dc);
|
||||||
|
|
||||||
bool doClear = true ;
|
bool doClear = true ;
|
||||||
@@ -152,41 +149,23 @@ void wxStaticText::OnDraw( wxDC &dc )
|
|||||||
break ;
|
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() ;
|
parent = parent->GetParent() ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (major < 10) && doClear )
|
|
||||||
dc.Clear() ;
|
|
||||||
|
|
||||||
while (i < text.Length())
|
while (i < text.Length())
|
||||||
{
|
{
|
||||||
paragraph += text[i];
|
paragraph += text[i];
|
||||||
|
|
||||||
if (text[i] == 13 || text[i] == 10)
|
if (text[i] == 13 || text[i] == 10)
|
||||||
|
DrawParagraph(dc, paragraph);
|
||||||
|
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (paragraph.Length() > 0)
|
||||||
DrawParagraph(dc, paragraph);
|
DrawParagraph(dc, paragraph);
|
||||||
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
if (paragraph.Length() > 0)
|
|
||||||
DrawParagraph(dc, paragraph);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStaticText::OnPaint( wxPaintEvent &event )
|
void wxStaticText::OnPaint( wxPaintEvent &event )
|
||||||
|
@@ -128,13 +128,10 @@ void wxStaticText::OnDraw( wxDC &dc )
|
|||||||
if (m_width <= 0 || m_height <= 0)
|
if (m_width <= 0 || m_height <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxString paragraph;
|
wxString paragraph;
|
||||||
int i = 0 ;
|
int i = 0 ;
|
||||||
wxString text = m_label;
|
wxString text = m_label;
|
||||||
|
|
||||||
int major,minor;
|
|
||||||
wxGetOsVersion( &major, &minor );
|
|
||||||
|
|
||||||
PrepareDC(dc);
|
PrepareDC(dc);
|
||||||
|
|
||||||
bool doClear = true ;
|
bool doClear = true ;
|
||||||
@@ -152,41 +149,23 @@ void wxStaticText::OnDraw( wxDC &dc )
|
|||||||
break ;
|
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() ;
|
parent = parent->GetParent() ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (major < 10) && doClear )
|
|
||||||
dc.Clear() ;
|
|
||||||
|
|
||||||
while (i < text.Length())
|
while (i < text.Length())
|
||||||
{
|
{
|
||||||
paragraph += text[i];
|
paragraph += text[i];
|
||||||
|
|
||||||
if (text[i] == 13 || text[i] == 10)
|
if (text[i] == 13 || text[i] == 10)
|
||||||
|
DrawParagraph(dc, paragraph);
|
||||||
|
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (paragraph.Length() > 0)
|
||||||
DrawParagraph(dc, paragraph);
|
DrawParagraph(dc, paragraph);
|
||||||
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
if (paragraph.Length() > 0)
|
|
||||||
DrawParagraph(dc, paragraph);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStaticText::OnPaint( wxPaintEvent &event )
|
void wxStaticText::OnPaint( wxPaintEvent &event )
|
||||||
|
Reference in New Issue
Block a user