From 9ff44370c840a0ee19a67232dcb25bcf5eb31340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 8 Feb 2006 16:59:07 +0000 Subject: [PATCH] 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 --- src/apps/diskprobe/OpenWindow.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/apps/diskprobe/OpenWindow.cpp b/src/apps/diskprobe/OpenWindow.cpp index d4bcc9ec19..0b0e3b4dcd 100644 --- a/src/apps/diskprobe/OpenWindow.cpp +++ b/src/apps/diskprobe/OpenWindow.cpp @@ -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); }