From: Kevin Rosenberg Date: Mon, 3 Aug 2009 03:20:02 +0000 (-0600) Subject: Fix size of log textCtrl at startup X-Git-Tag: v5.0.5^2~1 X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=commitdiff_plain;h=8592d9469811305fbc4a895d78a6422502451eef Fix size of log textCtrl at startup --- diff --git a/src/ctsim.cpp b/src/ctsim.cpp index 48dd536..d58e7da 100644 --- a/src/ctsim.cpp +++ b/src/ctsim.cpp @@ -7,9 +7,7 @@ ** Date Started: July 2000 ** ** This is part of the CTSim program -** Copyright (c) 1983-2001 Kevin Rosenberg -** -** $Id$ +** Copyright (c) 1983-2009 Kevin Rosenberg ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -179,13 +177,13 @@ CTSimApp::OnInit() int xDisplay, yDisplay; ::wxDisplaySize (&xDisplay, &yDisplay); - m_pFrame = new MainFrame(m_docManager, (wxFrame *) NULL, -1, _T("CTSim"), wxPoint(0, 0), #ifdef CTSIM_MDI - wxSize(nearest(xDisplay * .75), nearest(yDisplay * .75)), + wxSize frameSize(nearest(xDisplay * .75), nearest(yDisplay * .75)); #else - wxSize(nearest(xDisplay * .6), nearest(yDisplay * .4)), + wxSize frameSize(nearest(xDisplay * .6), nearest(yDisplay * .4)); #endif - wxDEFAULT_FRAME_STYLE); + + m_pFrame = new MainFrame(m_docManager, (wxFrame *) NULL, -1, _T("CTSim"), wxPoint(0, 0), frameSize, wxDEFAULT_FRAME_STYLE); setIconForFrame (m_pFrame); m_pFrame->Centre(wxBOTH); @@ -209,7 +207,7 @@ CTSimApp::OnInit() m_pLogDoc->getView()->getFrame()->Show (true); } else #else - m_pLog = new wxTextCtrl (m_pFrame, -1, _T("Log Window\n"), wxPoint(0, 0), wxSize(0,0), wxTE_MULTILINE | wxTE_READONLY); + m_pLog = new wxTextCtrl (m_pFrame, -1, _T("Log Window\n"), wxPoint(0, 0), frameSize, wxTE_MULTILINE | wxTE_READONLY); #endif wxLog::SetActiveTarget (new wxLogTextCtrl(m_pLog)); diff --git a/src/ctsim.h b/src/ctsim.h index 8e3b357..f3f8083 100644 --- a/src/ctsim.h +++ b/src/ctsim.h @@ -7,9 +7,7 @@ ** Date Started: July 2000 ** ** This is part of the CTSim program -** Copyright (c) 1983-2001 Kevin Rosenberg -** -** $Id$ +** Copyright (c) 1983-2009 Kevin Rosenberg ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as