Remove the hack with changing the parent background colour in wxInfoBar.
Finding the closest info bar to copy the background colour from only worked for very simple layouts and failed for more complicated ones with nested sizers so don't try to change the colour automatically, it's easy enough to do it manually as shown in the updated dialogs sample. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -561,6 +561,12 @@ MyFrame::MyFrame(const wxString& title)
|
||||
sizer->Add(m_canvas, wxSizerFlags(1).Expand());
|
||||
sizer->Add(m_infoBarAdvanced, wxSizerFlags().Expand());
|
||||
SetSizer(sizer);
|
||||
|
||||
// final touch: under MSW the info bars are shown progressively and parts
|
||||
// of the parent window can be seen during the process, so use the same
|
||||
// background colour for our background as for the canvas window which
|
||||
// covers our entire client area to avoid jarring colour jumps
|
||||
SetOwnBackgroundColour(m_canvas->GetBackgroundColour());
|
||||
#endif // wxUSE_INFOBAR
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user