From fa4b51517abf5c108ad3a698482a26bc643cf789 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 16 Nov 2013 23:41:01 +0000 Subject: [PATCH] Set wxInfoBarGeneric text colour correctly. For some reason SetOwnForegroundColour() was used, but we really need to set the colour of the child text control and not our own colour here (which is not used for anything). This makes the text visible even when using non default tooltip colours, which could previously result in black-on-black text. See #15671. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/infobar.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/generic/infobar.cpp b/src/generic/infobar.cpp index 49cdefc582..b98df0cf29 100644 --- a/src/generic/infobar.cpp +++ b/src/generic/infobar.cpp @@ -69,9 +69,7 @@ bool wxInfoBarGeneric::Create(wxWindow *parent, wxWindowID winid) return false; // use special, easy to notice, colours - const wxColour colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK); - SetBackgroundColour(colBg); - SetOwnForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT)); + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK)); // create the controls: icon, text and the button to dismiss the // message. @@ -80,6 +78,7 @@ bool wxInfoBarGeneric::Create(wxWindow *parent, wxWindowID winid) m_icon = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap); m_text = new wxStaticText(this, wxID_ANY, ""); + m_text->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT)); m_button = wxBitmapButton::NewCloseButton(this, wxID_ANY); m_button->SetToolTip(_("Hide this notification message."));