]> git.saurik.com Git - wxWidgets.git/commitdiff
corrected graying out, only to be executed when background is gray or white
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 3 Jan 2002 09:29:20 +0000 (09:29 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 3 Jan 2002 09:29:20 +0000 (09:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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

index 88b0edf3f9b5564cc832cbde0f6b70553a469857..e977973b73ec30c1fc5062d29cb5a40df0207f18 100644 (file)
@@ -128,10 +128,17 @@ void wxStaticText::OnDraw( wxDC &dc )
     if (m_width <= 0 || m_height <= 0)
         return;
 
-  if ( !IsWindowHilited( MacGetRootWindow() ) )
+  if ( !IsWindowHilited( MacGetRootWindow() ) && 
+    ( GetBackgroundColour() == wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE ) 
+      || GetBackgroundColour() == wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE) ) )
   {
     dc.SetTextForeground( wxColour( 0x80 , 0x80 , 0x80 ) ) ;
   }
+  else
+  {
+    dc.SetTextForeground( GetForegroundColour() ) ;
+  }
+  
   wxString paragraph;
   int i = 0 ;
   wxString text = m_label;
index 88b0edf3f9b5564cc832cbde0f6b70553a469857..e977973b73ec30c1fc5062d29cb5a40df0207f18 100644 (file)
@@ -128,10 +128,17 @@ void wxStaticText::OnDraw( wxDC &dc )
     if (m_width <= 0 || m_height <= 0)
         return;
 
-  if ( !IsWindowHilited( MacGetRootWindow() ) )
+  if ( !IsWindowHilited( MacGetRootWindow() ) && 
+    ( GetBackgroundColour() == wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE ) 
+      || GetBackgroundColour() == wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE) ) )
   {
     dc.SetTextForeground( wxColour( 0x80 , 0x80 , 0x80 ) ) ;
   }
+  else
+  {
+    dc.SetTextForeground( GetForegroundColour() ) ;
+  }
+  
   wxString paragraph;
   int i = 0 ;
   wxString text = m_label;