From 2603848d7d91b37df8894ae3b1bf4fb2f1020c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 14 Sep 2015 20:28:52 +0200 Subject: [PATCH] ActivityMonitor: improve initial window size, and position. * By making it scale with the font size, and by using BWindow::CenterOnScreen(). --- src/apps/activitymonitor/ActivityWindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/apps/activitymonitor/ActivityWindow.cpp b/src/apps/activitymonitor/ActivityWindow.cpp index 62279b94f2..010db6be41 100644 --- a/src/apps/activitymonitor/ActivityWindow.cpp +++ b/src/apps/activitymonitor/ActivityWindow.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2008-2009, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2008-2015, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT License. */ @@ -47,6 +47,10 @@ ActivityWindow::ActivityWindow() if (settings.FindRect("window frame", &frame) == B_OK) { MoveTo(frame.LeftTop()); ResizeTo(frame.Width(), frame.Height()); + } else { + float scaling = be_plain_font->Size() / 12.0f; + ResizeTo(Frame().Width() * scaling, Frame().Height() * scaling); + CenterOnScreen(); } #ifdef __HAIKU__