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:
@@ -69,9 +69,7 @@ bool wxInfoBarGeneric::Create(wxWindow *parent, wxWindowID winid)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// use special, easy to notice, colours
|
// use special, easy to notice, colours
|
||||||
const wxColour colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK);
|
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
|
||||||
SetBackgroundColour(colBg);
|
|
||||||
SetOwnForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT));
|
|
||||||
|
|
||||||
// create the controls: icon, text and the button to dismiss the
|
// create the controls: icon, text and the button to dismiss the
|
||||||
// message.
|
// message.
|
||||||
@@ -80,6 +78,7 @@ bool wxInfoBarGeneric::Create(wxWindow *parent, wxWindowID winid)
|
|||||||
m_icon = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap);
|
m_icon = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap);
|
||||||
|
|
||||||
m_text = new wxStaticText(this, wxID_ANY, "");
|
m_text = new wxStaticText(this, wxID_ANY, "");
|
||||||
|
m_text->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT));
|
||||||
|
|
||||||
m_button = wxBitmapButton::NewCloseButton(this, wxID_ANY);
|
m_button = wxBitmapButton::NewCloseButton(this, wxID_ANY);
|
||||||
m_button->SetToolTip(_("Hide this notification message."));
|
m_button->SetToolTip(_("Hide this notification message."));
|
||||||
|
Reference in New Issue
Block a user