From: Stefan Csomor Date: Fri, 27 Feb 2009 05:23:22 +0000 (+0000) Subject: applying patch, fixes #10524 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c3e433b15929171af57df3c9c3c63d6ab8aa720b?ds=inline applying patch, fixes #10524 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/cocoa/textctrl.mm b/src/osx/cocoa/textctrl.mm index 308f0b8e9c..f4debced6c 100644 --- a/src/osx/cocoa/textctrl.mm +++ b/src/osx/cocoa/textctrl.mm @@ -165,6 +165,21 @@ impl = item; } +- (void) setEnabled:(BOOL) flag +{ + [super setEnabled: flag]; + + if (![self drawsBackground]) { + // Static text is drawn incorrectly when disabled. + // For an explanation, see + // http://www.cocoabuilder.com/archive/message/cocoa/2006/7/21/168028 + if (flag) { + [self setTextColor: [NSColor controlTextColor]]; + } else { + [self setTextColor: [NSColor secondarySelectedControlColor]]; + } + } +} - (void)controlTextDidChange:(NSNotification *)aNotification {