ActivityMonitor: improve initial window size, and position.
* By making it scale with the font size, and by using BWindow::CenterOnScreen().
This commit is contained in:
parent
8e96ec340b
commit
2603848d7d
@ -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.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -47,6 +47,10 @@ ActivityWindow::ActivityWindow()
|
|||||||
if (settings.FindRect("window frame", &frame) == B_OK) {
|
if (settings.FindRect("window frame", &frame) == B_OK) {
|
||||||
MoveTo(frame.LeftTop());
|
MoveTo(frame.LeftTop());
|
||||||
ResizeTo(frame.Width(), frame.Height());
|
ResizeTo(frame.Width(), frame.Height());
|
||||||
|
} else {
|
||||||
|
float scaling = be_plain_font->Size() / 12.0f;
|
||||||
|
ResizeTo(Frame().Width() * scaling, Frame().Height() * scaling);
|
||||||
|
CenterOnScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __HAIKU__
|
#ifdef __HAIKU__
|
||||||
|
Loading…
Reference in New Issue
Block a user