From 37191f6f16a48d25d9525928e63c1617cde558d3 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 7 Sep 2017 19:00:43 +0200 Subject: [PATCH] Only set font color if explicitly set Otherwise eg the default button doesn't get its white font color. --- src/osx/cocoa/window.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index b891f10f60..8b424e38ac 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -2447,7 +2447,8 @@ void wxWidgetCocoaImpl::SetLabel( const wxString& title, wxFontEncoding encoding if ( [m_osxView respondsToSelector:@selector(setAttributedTitle:) ] ) { wxFont f = GetWXPeer()->GetFont(); - wxColour col = GetWXPeer()->GetForegroundColour(); + // we should not override system font colors unless explicitly specified + wxColour col = GetWXPeer()->UseForegroundColour() ? GetWXPeer()->GetForegroundColour() : wxNullColour; if ( f.GetStrikethrough() || f.GetUnderlined() || col.IsOk() ) { wxCFStringRef cf(title, encoding );