X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b15fdfcf3511eefea1fb99f33d24291f4e53a34..2d956b58023a4955313a1c1531bc70a0deb0b831:/demos/life/life.cpp?ds=sidebyside diff --git a/demos/life/life.cpp b/demos/life/life.cpp index 0043a399cc..35bcc5b6b4 100644 --- a/demos/life/life.cpp +++ b/demos/life/life.cpp @@ -41,7 +41,7 @@ // resources // -------------------------------------------------------------------------- -#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) +#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__) // application icon #include "mondrian.xpm" @@ -602,7 +602,7 @@ LifeNavigator::LifeNavigator(wxWindow *parent) bmpe = wxBITMAP(east), bmps = wxBITMAP(south); -#if !defined(__WXGTK__) && !defined(__WXMOTIF__) +#if !defined(__WXGTK__) && !defined(__WXMOTIF__) && !defined(__WXMAC__) bmpn.SetMask(new wxMask(bmpn, *wxLIGHT_GREY)); bmpw.SetMask(new wxMask(bmpw, *wxLIGHT_GREY)); bmpc.SetMask(new wxMask(bmpc, *wxLIGHT_GREY)); @@ -634,11 +634,14 @@ LifeNavigator::LifeNavigator(wxWindow *parent) sizer1->Add( sizer2 ); sizer1->Add( bs, 0, wxCENTRE | wxSOUTH, 4 ); - // set the miniframe size + // set the panel and miniframe size panel->SetSizer(sizer1); panel->SetAutoLayout(TRUE); - sizer1->Fit(this); - sizer1->SetSizeHints(this); + + sizer1->Fit(panel); + SetClientSize(panel->GetSize()); + wxSize sz = GetSize(); + SetSizeHints(sz.x, sz.y, sz.x, sz.y); // move it to a sensible position wxRect parentRect = parent->GetRect();