From: Stefan Csomor Date: Fri, 25 Jun 2004 13:40:16 +0000 (+0000) Subject: colors are only set if non-black, otherwise Enable(false) does not gray them out X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1189618f7adcb02b44e6ce5e92b0fe5ba173a4aa?hp=2cce9b1152e0a032553d68ef312c3e0abb827c61 colors are only set if non-black, otherwise Enable(false) does not gray them out git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 295086cb60..c6cc88f72d 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -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() ;