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.
This commit is contained in:
@@ -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]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user