When a window is resized, its position can change as well as its size but it
wasn't updated before. Do it now.
Closes #11421.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64454
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- Added wxProgressDialog::Was{Cancelled,Skipped}() (Julien Weinzorn).
- Added wxTreeCtrl::{Clear,Set}FocusedItem() (Nikolay Tiushkov).
- Added "filter changed" event to wxFileCtrl (Bill Jones).
+- wxAUI: update floating window position and not only size on resize (MacGyver).
GTK:
void OnFloatingPaneMoved(wxWindow* window, wxDirection dir);
void OnFloatingPaneActivated(wxWindow* window);
void OnFloatingPaneClosed(wxWindow* window, wxCloseEvent& evt);
- void OnFloatingPaneResized(wxWindow* window, const wxSize& size);
+ void OnFloatingPaneResized(wxWindow* window, const wxRect& rect);
void Render(wxDC* dc);
void Repaint(wxDC* dc = NULL);
void ProcessMgrEvent(wxAuiManagerEvent& event);
}
-void wxAuiFloatingFrame::OnSize(wxSizeEvent& event)
+void wxAuiFloatingFrame::OnSize(wxSizeEvent& WXUNUSED(event))
{
if (m_owner_mgr)
{
- m_owner_mgr->OnFloatingPaneResized(m_pane_window, event.GetSize());
+ m_owner_mgr->OnFloatingPaneResized(m_pane_window, GetRect());
}
}
HideHint();
}
-void wxAuiManager::OnFloatingPaneResized(wxWindow* wnd, const wxSize& size)
+void wxAuiManager::OnFloatingPaneResized(wxWindow* wnd, const wxRect& rect)
{
// try to find the pane
wxAuiPaneInfo& pane = GetPane(wnd);
wxASSERT_MSG(pane.IsOk(), wxT("Pane window not found"));
- pane.floating_size = size;
+ pane.FloatingSize(rect.GetWidth(), rect.GetHeight());
+
+ // the top-left position may change as well as the size
+ pane.FloatingPosition(rect.x, rect.y);
}