]> git.saurik.com Git - wxWidgets.git/commitdiff
Use the best instead of current page size in OS X preferences dialog.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 21 May 2013 23:47:20 +0000 (23:47 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 21 May 2013 23:47:20 +0000 (23:47 +0000)
The page, which is typically just a wxPanel, is usually not created with the
correct size, so resize it to its best size before showing it in the
preferences dialog.

This makes OS X behaviour consistent with MSW and GTK and is generally more
useful.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/preferences.mm

index 81160c7b3e4d3be0e8456ac4e743342b96b2a8c4..14a971d7e517d3732efda68f44a5a2fdd27ba365 100644 (file)
@@ -129,6 +129,7 @@ private:
         {
             info->win = info->page->CreateWindow(this);
             info->win->Hide();
+            info->win->Fit();
             // fill the page with data using wxEVT_INIT_DIALOG/TransferDataToWindow:
             info->win->InitDialog();
         }