Fixed centering of the window in case of multiple screens.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16296 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b8a7e035ff
commit
9ff44370c8
@ -1,7 +1,7 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
/*
|
||||
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "OpenWindow.h"
|
||||
@ -62,9 +62,9 @@ OpenWindow::OpenWindow()
|
||||
button->MoveBy(-button->Bounds().Width() - 8, 0);
|
||||
view->AddChild(button);
|
||||
|
||||
BScreen screen;
|
||||
MoveTo((screen.Frame().Width() - Frame().Width()) / 2,
|
||||
(screen.Frame().Height() - Frame().Height()) / 2);
|
||||
BScreen screen(this);
|
||||
MoveTo(screen.Frame().left + (screen.Frame().Width() - Frame().Width()) / 2,
|
||||
screen.Frame().top + (screen.Frame().Height() - Frame().Height()) / 2);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user