From e9953d08dd2bcc039ea486525f3e465a6662c7ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sundstr=C3=B6m?= Date: Thu, 1 Oct 2009 00:14:40 +0000 Subject: [PATCH] Standardize on BWindow::CenterOnScreen(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33379 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/installer/InstallerApp.cpp | 5 +---- src/apps/installer/InstallerWindow.cpp | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/apps/installer/InstallerApp.cpp b/src/apps/installer/InstallerApp.cpp index 3edec8e9f5..c6a50a45d2 100644 --- a/src/apps/installer/InstallerApp.cpp +++ b/src/apps/installer/InstallerApp.cpp @@ -185,10 +185,7 @@ InstallerApp::ReadyToRun() .SetInsets(10, 10, 10, 10) ); - BRect frame = BScreen().Frame(); - fEULAWindow->MoveTo(frame.left + (frame.Width() - eulaFrame.Width()) / 2, - frame.top + (frame.Height() - eulaFrame.Height()) / 2); - + fEULAWindow->CenterOnScreen(); fEULAWindow->Show(); #else // Show the installer window without EULA. diff --git a/src/apps/installer/InstallerWindow.cpp b/src/apps/installer/InstallerWindow.cpp index 1867daee3c..7c20e58ae6 100644 --- a/src/apps/installer/InstallerWindow.cpp +++ b/src/apps/installer/InstallerWindow.cpp @@ -302,9 +302,7 @@ InstallerWindow::FrameResized(float width, float height) // assume that the first frame event is because of this adoption and // move ourselves to the screen center... fNeedsToCenterOnScreen = false; - BRect frame = BScreen(this).Frame(); - MoveTo(frame.left + (frame.Width() - Frame().Width()) / 2, - frame.top + (frame.Height() - Frame().Height()) / 2); + CenterOnScreen(); } }