X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c4e8f384d7c9a2e1f31e9602917f2d1318de01f..4219d8b027a351fb6c2d1580c292e639bd322f77:/src/cocoa/dialog.mm diff --git a/src/cocoa/dialog.mm b/src/cocoa/dialog.mm index f8d3faeafb..9c2be1a64f 100644 --- a/src/cocoa/dialog.mm +++ b/src/cocoa/dialog.mm @@ -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