Update AUI floating windows position and not just size on resize.
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
This commit is contained in:
@@ -521,6 +521,7 @@ All (GUI):
|
||||
- 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:
|
||||
|
||||
|
@@ -551,7 +551,7 @@ protected:
|
||||
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);
|
||||
|
@@ -157,11 +157,11 @@ wxAuiManager* wxAuiFloatingFrame::GetOwnerManager() const
|
||||
}
|
||||
|
||||
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -3676,13 +3676,16 @@ void wxAuiManager::OnFloatingPaneMoved(wxWindow* wnd, wxDirection dir)
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user