From c2eee6f55bf80b098d7f88c71a4d773f1346a463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 20 Sep 2010 15:16:10 +0000 Subject: [PATCH] * 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 --- src/apps/mediaplayer/interface/DurationView.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/apps/mediaplayer/interface/DurationView.cpp b/src/apps/mediaplayer/interface/DurationView.cpp index 15c53f4b15..d5befd62dc 100644 --- a/src/apps/mediaplayer/interface/DurationView.cpp +++ b/src/apps/mediaplayer/interface/DurationView.cpp @@ -11,7 +11,6 @@ #include "DurationToString.h" -// constructor DurationView::DurationView(const char* name) : BStringView(name, ""), @@ -100,9 +99,13 @@ DurationView::SetMode(uint32 mode) void DurationView::SetSymbolScale(float scale) { - BFont font(be_bold_font); - font.SetSize(font.Size() * scale * 1.2); - SetFont(&font); + if (scale != 1.0f) { + BFont font(be_bold_font); + font.SetSize(font.Size() * scale * 1.2); + SetFont(&font); + } else + SetFont(be_plain_font); + InvalidateLayout(); }