* Only change the font size in case the interface is resized; ie. use the
default plain font otherwise. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38743 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -11,7 +11,6 @@
|
|||||||
#include "DurationToString.h"
|
#include "DurationToString.h"
|
||||||
|
|
||||||
|
|
||||||
// constructor
|
|
||||||
DurationView::DurationView(const char* name)
|
DurationView::DurationView(const char* name)
|
||||||
:
|
:
|
||||||
BStringView(name, ""),
|
BStringView(name, ""),
|
||||||
@@ -100,9 +99,13 @@ DurationView::SetMode(uint32 mode)
|
|||||||
void
|
void
|
||||||
DurationView::SetSymbolScale(float scale)
|
DurationView::SetSymbolScale(float scale)
|
||||||
{
|
{
|
||||||
BFont font(be_bold_font);
|
if (scale != 1.0f) {
|
||||||
font.SetSize(font.Size() * scale * 1.2);
|
BFont font(be_bold_font);
|
||||||
SetFont(&font);
|
font.SetSize(font.Size() * scale * 1.2);
|
||||||
|
SetFont(&font);
|
||||||
|
} else
|
||||||
|
SetFont(be_plain_font);
|
||||||
|
|
||||||
InvalidateLayout();
|
InvalidateLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user