X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/28edd9ef206ae06b03ed21c9c769ce408071f673..1affde0a6b0b61c017d9164ab74aade81e26d6b7:/src/generic/panelg.cpp diff --git a/src/generic/panelg.cpp b/src/generic/panelg.cpp index 1b36dff649..0c7b85fb42 100644 --- a/src/generic/panelg.cpp +++ b/src/generic/panelg.cpp @@ -95,7 +95,7 @@ void wxPanel::InitDialog() // Responds to colour changes, and passes event on to children. void wxPanel::OnSysColourChanged(wxSysColourChangedEvent& event) { - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); Refresh(); // Propagate the event to the non-top-level children @@ -108,6 +108,33 @@ void wxPanel::OnSize(wxSizeEvent& event) if (GetAutoLayout()) Layout(); #endif // wxUSE_CONSTRAINTS + + // + // Need to properly move child windows under OS/2 + // +#if defined(__WXPM__) + else + { + PSWP pWinSwp = GetSwp(); + + if (pWinSwp->cx == 0 && pWinSwp->cy == 0 && pWinSwp->fl == 0) + // + // Uninitialized + // + ::WinQueryWindowPos(GetHWND(), pWinSwp); + else + { + SWP vSwp; + int nYDiff; + + ::WinQueryWindowPos(GetHWND(), &vSwp); + nYDiff = pWinSwp->cy - vSwp.cy; + MoveChildren(nYDiff); + pWinSwp->cx = vSwp.cx; + pWinSwp->cy = vSwp.cy; + } + } +#endif event.Skip(); }