]> git.saurik.com Git - wxWidgets.git/commitdiff
Added sizer.desktopmargin.x, sizer.desktopmargin.y options to allow for desktop decor...
authorJulian Smart <julian@anthemion.co.uk>
Tue, 6 Nov 2007 09:42:28 +0000 (09:42 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 6 Nov 2007 09:42:28 +0000 (09:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/sysopt.tex
src/common/sizer.cpp

index 08eb57b3a8e439e7e48b29b50000a3852078b3dc..a8b885da0aa21195a19645157ae2fd04255bdb77 100644 (file)
@@ -88,6 +88,15 @@ A reasonable default is used if not specified.}
 \twocolitem{motif.largebuttons}{If 1, uses a bigger default size for wxButtons.}
 \end{twocollist}
 
+\wxheading{All}
+
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf Option}}{{\bf Value}}
+\twocolitem{sizer.desktopmargin.x}{The horizontal margin to subtract from the desktop size when computing the maximum top-level window size in wxSizer::Fit.}
+\twocolitem{sizer.desktopmargin.y}{The vertical margin to subtract from the desktop size when computing the maximum top-level window size in wxSizer::Fit.}
+\end{twocollist}
+
 The compile-time option to include or exclude this functionality
 is wxUSE\_SYSTEM\_OPTIONS.
 
index 3b1a77280abf9af8d861d6f65069639e28b97a03..364b173dc15c93c3c5a0dda68085858eca5e9a2b 100644 (file)
     #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
         }
     }