X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e334d0eac863deef820a2ebba26559892023a5fb..7847232620296cd8d5c5cec8a5a50aa7627cfe31:/demos/life/life.cpp diff --git a/demos/life/life.cpp b/demos/life/life.cpp index cf63a5124a..b6d1a7ae58 100644 --- a/demos/life/life.cpp +++ b/demos/life/life.cpp @@ -194,9 +194,9 @@ LifeFrame::LifeFrame() : wxFrame((wxFrame *)0, -1, _("Life!"), wxPoint(200, 200) SetIcon(wxICON(mondrian)); // menu bar - wxMenu *menuFile = new wxMenu("", wxMENU_TEAROFF); - wxMenu *menuView = new wxMenu("", wxMENU_TEAROFF); - wxMenu *menuGame = new wxMenu("", wxMENU_TEAROFF); + wxMenu *menuFile = new wxMenu(_T(""), wxMENU_TEAROFF); + wxMenu *menuView = new wxMenu(_T(""), wxMENU_TEAROFF); + wxMenu *menuGame = new wxMenu(_T(""), wxMENU_TEAROFF); menuFile->Append(ID_NEW, _("&New"), _("Start a new game")); menuFile->Append(ID_OPEN, _("&Open..."), _("Open an existing Life pattern")); @@ -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(); @@ -1054,7 +1057,7 @@ void LifeCanvas::OnScroll(wxScrollWinEvent& event) else if (type == wxEVT_SCROLLWIN_PAGEDOWN) { - scrollinc = -10; + scrollinc = +10; } else if (type == wxEVT_SCROLLWIN_THUMBTRACK)