From c26939858867314d182207dddafa14a91e2dd8f4 Mon Sep 17 00:00:00 2001 From: sbrowne Date: Sat, 18 Jul 2015 01:35:29 +0200 Subject: [PATCH] Do use disabled control text color for wxStaticText in OS X. Contrary to an old comment, using it seems to work, while using secondarySelectedControlColor results in incorrect appearance, different from the other disabled controls and, worse, makes the labels unreadable as their colour is too close to that of the background inside nested panels. See #10524. --- src/osx/cocoa/stattext.mm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/osx/cocoa/stattext.mm b/src/osx/cocoa/stattext.mm index 9e51efa8b7..52575abaf6 100644 --- a/src/osx/cocoa/stattext.mm +++ b/src/osx/cocoa/stattext.mm @@ -60,10 +60,8 @@ [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 (![self drawsBackground]) + { if (flag) { if (m_textColor) @@ -76,7 +74,7 @@ [m_textColor release]; m_textColor = [[self textColor] retain]; } - [self setTextColor: [NSColor secondarySelectedControlColor]]; + [self setTextColor: [NSColor disabledControlTextColor]]; } } }