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