[haiku-commits] r38613 - haiku/trunk/src/apps/terminal

  • From: mattmadia@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 12 Sep 2010 14:01:28 +0200 (CEST)

Author: mmadia
Date: 2010-09-12 14:01:28 +0200 (Sun, 12 Sep 2010)
New Revision: 38613
Changeset: http://dev.haiku-os.org/changeset/38613
Ticket: http://dev.haiku-os.org/ticket/6102

Modified:
   haiku/trunk/src/apps/terminal/TermWindow.cpp
Log:
Patch by Chris Roberts: calculate Terminal's startup size properly.
Tested with font size 10, 16, 18. Fixes #6102.


Modified: haiku/trunk/src/apps/terminal/TermWindow.cpp
===================================================================
--- haiku/trunk/src/apps/terminal/TermWindow.cpp        2010-09-12 11:22:15 UTC 
(rev 38612)
+++ haiku/trunk/src/apps/terminal/TermWindow.cpp        2010-09-12 12:01:28 UTC 
(rev 38613)
@@ -842,6 +842,10 @@
                session->windowTitle = fInitialTitle;
                fSessions.AddItem(session);
 
+               BFont font;
+               _GetPreferredFont(font);
+               view->SetTermFont(&font);
+
                int width, height;
                view->GetFontSize(&width, &height);
 
@@ -879,10 +883,6 @@
                view->SetEncoding(EncodingID(
                        PrefHandler::Default()->getString(PREF_TEXT_ENCODING)));
 
-               BFont font;
-               _GetPreferredFont(font);
-               view->SetTermFont(&font);
-
                _SetTermColors(containerView);
 
                // TODO: No fTabView->Select(tab); ?


Other related posts:

  • » [haiku-commits] r38613 - haiku/trunk/src/apps/terminal - mattmadia