Fixed BView::SetFontSize() - only the internal font state was changed,

no one told the app_server about it (ie. StringWidth() would work
correctly, but the app_server would ignore the font size).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13370 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-06-30 23:02:34 +00:00
parent 0b2dbe7d46
commit 793b31c5fd

View File

@ -2016,6 +2016,7 @@ BView::SetFont(const BFont* font, uint32 mask)
if (mask == B_FONT_ALL) {
fState->font = *font;
} else {
// ToDo: move this into a BFont method
if (mask & B_FONT_FAMILY_AND_STYLE)
fState->font.SetFamilyAndStyle(font->FamilyAndStyle());
@ -2074,7 +2075,10 @@ BView::GetFontHeight(font_height *height) const
void
BView::SetFontSize(float size)
{
fState->font.SetSize(size);
BFont font;
font.SetSize(size);
SetFont(&font, B_FONT_SIZE);
}