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:
@@ -209,7 +209,8 @@ TermWindow::_GetPreferredFonts(BFont &fullFont, BFont &halfFont)
|
|||||||
if (size < 6.0f)
|
if (size < 6.0f)
|
||||||
size = 6.0f;
|
size = 6.0f;
|
||||||
halfFont.SetSize(size);
|
halfFont.SetSize(size);
|
||||||
|
halfFont.SetSpacing(B_FIXED_SPACING);
|
||||||
|
|
||||||
family = PrefHandler::Default()->getString(PREF_FULL_FONT_FAMILY);
|
family = PrefHandler::Default()->getString(PREF_FULL_FONT_FAMILY);
|
||||||
|
|
||||||
fullFont.SetFamilyAndStyle(family, NULL);
|
fullFont.SetFamilyAndStyle(family, NULL);
|
||||||
@@ -225,8 +226,6 @@ void
|
|||||||
TermWindow::MessageReceived(BMessage *message)
|
TermWindow::MessageReceived(BMessage *message)
|
||||||
{
|
{
|
||||||
int32 encodingId;
|
int32 encodingId;
|
||||||
BFont halfFont;
|
|
||||||
BFont fullFont;
|
|
||||||
bool findresult;
|
bool findresult;
|
||||||
|
|
||||||
switch (message->what) {
|
switch (message->what) {
|
||||||
@@ -379,17 +378,10 @@ TermWindow::MessageReceived(BMessage *message)
|
|||||||
case MSG_HALF_SIZE_CHANGED:
|
case MSG_HALF_SIZE_CHANGED:
|
||||||
case MSG_FULL_SIZE_CHANGED:
|
case MSG_FULL_SIZE_CHANGED:
|
||||||
{
|
{
|
||||||
|
BFont halfFont, fullFont;
|
||||||
halfFont.SetFamilyAndStyle (PrefHandler::Default()->getString(PREF_HALF_FONT_FAMILY),NULL);
|
_GetPreferredFonts(fullFont, halfFont);
|
||||||
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);
|
|
||||||
|
|
||||||
_ActiveTermView()->SetTermFont (&halfFont, &fullFont);
|
_ActiveTermView()->SetTermFont (&halfFont, &fullFont);
|
||||||
BRect rect = _ActiveTermView()->SetTermSize (0, 0, 0);
|
BRect rect = _ActiveTermView()->SetTermSize(0, 0, 0);
|
||||||
|
|
||||||
int width, height;
|
int width, height;
|
||||||
_ActiveTermView()->GetFontSize(&width, &height);
|
_ActiveTermView()->GetFontSize(&width, &height);
|
||||||
|
|||||||
Reference in New Issue
Block a user