Fix small error in floating AUI frames client size under wxMSW.
The client size of the floating frames ended up being wrong because we changed the wxRESIZE_BORDER flag after setting it and this changed it (at least under MSW). Reset wxRESIZE_BORDER first now and set the client size correctly afterwards. Closes #13043. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -123,7 +123,22 @@ void wxAuiFloatingFrame::SetPaneWindow(const wxAuiPaneInfo& pane)
|
||||
|
||||
SetTitle(pane.caption);
|
||||
|
||||
if (pane.floating_size != wxDefaultSize)
|
||||
// This code is slightly awkward because we need to reset wxRESIZE_BORDER
|
||||
// before calling SetClientSize() below as doing it after setting the
|
||||
// client size would actually change it, at least under MSW, where the
|
||||
// total window size doesn't change and hence, as the borders size changes,
|
||||
// the client size does change.
|
||||
//
|
||||
// So we must call it first but doing it generates a size event and updates
|
||||
// pane.floating_size from inside it so we must also record its original
|
||||
// value before doing it.
|
||||
const bool hasFloatingSize = pane.floating_size != wxDefaultSize;
|
||||
if (pane.IsFixed())
|
||||
{
|
||||
SetWindowStyleFlag(GetWindowStyleFlag() & ~wxRESIZE_BORDER);
|
||||
}
|
||||
|
||||
if ( hasFloatingSize )
|
||||
{
|
||||
SetSize(pane.floating_size);
|
||||
}
|
||||
@@ -144,11 +159,6 @@ void wxAuiFloatingFrame::SetPaneWindow(const wxAuiPaneInfo& pane)
|
||||
|
||||
SetClientSize(size);
|
||||
}
|
||||
|
||||
if (pane.IsFixed())
|
||||
{
|
||||
SetWindowStyleFlag(GetWindowStyleFlag() & ~wxRESIZE_BORDER);
|
||||
}
|
||||
}
|
||||
|
||||
wxAuiManager* wxAuiFloatingFrame::GetOwnerManager() const
|
||||
|
Reference in New Issue
Block a user