Added sizer.desktopmargin.x, sizer.desktopmargin.y options to allow for desktop decorations in wxSizer::Fit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -31,6 +31,10 @@
|
||||
#include "wx/toplevel.h"
|
||||
#endif // WX_PRECOMP
|
||||
|
||||
#if wxUSE_SYSTEM_OPTIONS
|
||||
#include "wx/sysopt.h"
|
||||
#endif
|
||||
|
||||
#include "wx/listimpl.cpp"
|
||||
|
||||
|
||||
@@ -792,6 +796,13 @@ wxSize wxSizer::Fit( wxWindow *window )
|
||||
}
|
||||
|
||||
sizeMax = wxDisplay(disp).GetClientArea().GetSize();
|
||||
|
||||
#if wxUSE_SYSTEM_OPTIONS
|
||||
int marginX = wxSystemOptions::GetOptionInt(wxT("sizer.desktopmargin.x"));
|
||||
int marginY = wxSystemOptions::GetOptionInt(wxT("sizer.desktopmargin.y"));
|
||||
sizeMax.x -= marginX;
|
||||
sizeMax.y -= marginY;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user