Also use _GetPreferredFonts() in the other place when we read the fonts

from the preferences


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21985 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2007-08-16 15:36:42 +00:00
parent e7f9f277ef
commit 8b63673c13
+5 -13
View File
@@ -209,7 +209,8 @@ TermWindow::_GetPreferredFonts(BFont &fullFont, BFont &halfFont)
if (size < 6.0f)
size = 6.0f;
halfFont.SetSize(size);
halfFont.SetSpacing(B_FIXED_SPACING);
family = PrefHandler::Default()->getString(PREF_FULL_FONT_FAMILY);
fullFont.SetFamilyAndStyle(family, NULL);
@@ -225,8 +226,6 @@ void
TermWindow::MessageReceived(BMessage *message)
{
int32 encodingId;
BFont halfFont;
BFont fullFont;
bool findresult;
switch (message->what) {
@@ -379,17 +378,10 @@ TermWindow::MessageReceived(BMessage *message)
case MSG_HALF_SIZE_CHANGED:
case MSG_FULL_SIZE_CHANGED:
{
halfFont.SetFamilyAndStyle (PrefHandler::Default()->getString(PREF_HALF_FONT_FAMILY),NULL);
halfFont.SetSize (PrefHandler::Default()->getFloat(PREF_HALF_FONT_SIZE));
halfFont.SetSpacing (B_FIXED_SPACING);
fullFont.SetFamilyAndStyle (PrefHandler::Default()->getString(PREF_FULL_FONT_FAMILY),NULL);
fullFont.SetSize (PrefHandler::Default()->getFloat(PREF_FULL_FONT_SIZE));
fullFont.SetSpacing (B_FIXED_SPACING);
BFont halfFont, fullFont;
_GetPreferredFonts(fullFont, halfFont);
_ActiveTermView()->SetTermFont (&halfFont, &fullFont);
BRect rect = _ActiveTermView()->SetTermSize (0, 0, 0);
BRect rect = _ActiveTermView()->SetTermSize(0, 0, 0);
int width, height;
_ActiveTermView()->GetFontSize(&width, &height);