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/trunk@75207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-11-16 23:37:38 +00:00
parent 065d3c385c
commit 94e3516305

View File

@@ -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."));