]> git.saurik.com Git - wxWidgets.git/commitdiff
colors are only set if non-black, otherwise Enable(false) does not gray them out
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 25 Jun 2004 13:40:16 +0000 (13:40 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 25 Jun 2004 13:40:16 +0000 (13:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp

index 295086cb603649499b4d75d37072ee3ec0303ec7..c6cc88f72dc3af807714dd3cf4d7274ce6595e4d 100644 (file)
@@ -886,8 +886,14 @@ void wxWindowMac::MacUpdateControlFont()
         fontStyle.just = teJustRight ;
 
     
-    fontStyle.foreColor = MAC_WXCOLORREF(GetForegroundColour().GetPixel() ) ;
-    fontStyle.flags |= kControlUseForeColorMask ;
+    // we only should do this in case of a non-standard color, as otherwise 'disabled' controls
+    // won't get grayed out by the system anymore
+    
+    if ( GetForegroundColour() != *wxBLACK )
+    {
+        fontStyle.foreColor = MAC_WXCOLORREF(GetForegroundColour().GetPixel() ) ;
+        fontStyle.flags |= kControlUseForeColorMask ;
+    }
        
        ::SetControlFontStyle( *m_peer , &fontStyle );
        Refresh() ;