From 793b31c5fd6728ad53f21b2b676920557c4d76b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 30 Jun 2005 23:02:34 +0000 Subject: [PATCH] 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 --- src/kits/interface/View.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/View.cpp b/src/kits/interface/View.cpp index 1514ab4edd..a1dc5363fc 100644 --- a/src/kits/interface/View.cpp +++ b/src/kits/interface/View.cpp @@ -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); }