From 8592d9469811305fbc4a895d78a6422502451eef Mon Sep 17 00:00:00 2001 From: Kevin Rosenberg Date: Sun, 2 Aug 2009 21:20:02 -0600 Subject: [PATCH] Fix size of log textCtrl at startup --- src/ctsim.cpp | 14 ++++++-------- src/ctsim.h | 4 +--- 2 files changed, 7 insertions(+), 11 deletions(-) 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 -- 2.34.1