Make sure the font size for the window labels does not grow beyond the system

plain font size.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31816 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2009-07-27 16:09:50 +00:00
parent 95337b50b0
commit 90c518c2c2

View File

@ -13,6 +13,7 @@
#include "AppServer.h"
#include "Desktop.h"
#include "DrawingEngine.h"
#include "ServerApp.h"
#include "Window.h"
#include "Workspace.h"
@ -302,8 +303,11 @@ WorkspacesView::_DrawWorkspace(DrawingEngine* drawingEngine,
drawingEngine->ConstrainClippingRegion(&backgroundRegion);
ServerFont font = fDrawState->Font();
font.SetSize(ceilf(max_c(9.0,
min_c(Frame().Height(), Frame().Width()) / 15)));
font.SetSize(fWindow->ServerWindow()->App()->PlainFont().Size());
float reducedSize = ceilf(max_c(8.0f,
min_c(Frame().Height(), Frame().Width()) / 15));
if (font.Size() > reducedSize)
font.SetSize(reducedSize);
fDrawState->SetFont(font);
drawingEngine->SetFont(font);