Standardize on BWindow::CenterOnScreen().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33379 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jonas Sundström 2009-10-01 00:14:40 +00:00
parent 941098a211
commit e9953d08dd
2 changed files with 2 additions and 7 deletions

View File

@ -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.

View File

@ -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();
}
}