]> git.saurik.com Git - wxWidgets.git/commitdiff
MacOS 9 seems to clear the background itself, too.
authorRobert Roebling <robert@roebling.de>
Mon, 17 Dec 2001 10:06:33 +0000 (10:06 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 17 Dec 2001 10:06:33 +0000 (10:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/stattext.cpp
src/mac/stattext.cpp

index 62e095f5facee3cee3bdeaa3fedb4d5ad7b83c50..39a5e39b06dfc1935649279a0b340be7ad1454bb 100644 (file)
@@ -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 ) 
index 62e095f5facee3cee3bdeaa3fedb4d5ad7b83c50..39a5e39b06dfc1935649279a0b340be7ad1454bb 100644 (file)
@@ -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 )