X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2158f4d798650d7f8cc59ba36e115679b0effe1b..4090fe84c47112e59b7a3e88bc805c781ee4d10d:/src/cocoa/dialog.mm diff --git a/src/cocoa/dialog.mm b/src/cocoa/dialog.mm index e51faffa37..9c2be1a64f 100644 --- a/src/cocoa/dialog.mm +++ b/src/cocoa/dialog.mm @@ -4,7 +4,7 @@ // Author: David Elliott // Modified by: // Created: 2002/12/15 -// RCS-ID: $Id: +// RCS-ID: $Id$ // Copyright: 2002 David Elliott // Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// @@ -57,13 +57,9 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID winid, if (parent) parent->AddChild(this); - NSRect cocoaRect = NSMakeRect(300,300,200,200); + unsigned int cocoaStyle = NSWindowStyleForWxStyle(style); - unsigned int cocoaStyle = 0; - cocoaStyle |= NSTitledWindowMask; - cocoaStyle |= NSClosableWindowMask; - cocoaStyle |= NSMiniaturizableWindowMask; - cocoaStyle |= NSResizableWindowMask; + NSRect cocoaRect = MakeInitialNSWindowContentRect(pos,size,cocoaStyle); m_cocoaNSWindow = NULL; SetNSPanel([[NSPanel alloc] initWithContentRect:cocoaRect styleMask:cocoaStyle backing:NSBackingStoreBuffered defer:NO]); @@ -103,6 +99,10 @@ bool wxDialog::Show(bool show) if(show) { wxAutoNSAutoreleasePool pool; + + if (CanDoLayoutAdaptation()) + DoLayoutAdaptation(); + InitDialog(); if(IsModal()) { // ShowModal() will show the dialog @@ -169,4 +169,3 @@ void wxDialog::EndModal(int retCode) SetReturnCode(retCode); Show(false); } -