From 9ecf21c57efecd36664d268476df6150f34010e8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 24 Oct 2014 21:54:18 +0000 Subject: [PATCH] Use its own foreground colour in wxGenericStaticText. For some reason, the control always drew itself using wxSYS_COLOUR_BTNTEXT. This is a good default, but it shouldn't ignore the explicitly set foreground colour, so use it instead. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/stattextg.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/generic/stattextg.cpp b/src/generic/stattextg.cpp index 74843fa21e..bf083853e2 100644 --- a/src/generic/stattextg.cpp +++ b/src/generic/stattextg.cpp @@ -70,12 +70,7 @@ void wxGenericStaticText::OnPaint(wxPaintEvent& WXUNUSED(event)) wxPaintDC dc(this); wxRect rect = GetClientRect(); - if ( IsEnabled() ) - { - dc.SetTextForeground( - wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); - } - else // paint disabled text + if ( !IsEnabled() ) { // draw shadow of the text dc.SetTextForeground(