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:
@@ -185,10 +185,7 @@ InstallerApp::ReadyToRun()
|
|||||||
.SetInsets(10, 10, 10, 10)
|
.SetInsets(10, 10, 10, 10)
|
||||||
);
|
);
|
||||||
|
|
||||||
BRect frame = BScreen().Frame();
|
fEULAWindow->CenterOnScreen();
|
||||||
fEULAWindow->MoveTo(frame.left + (frame.Width() - eulaFrame.Width()) / 2,
|
|
||||||
frame.top + (frame.Height() - eulaFrame.Height()) / 2);
|
|
||||||
|
|
||||||
fEULAWindow->Show();
|
fEULAWindow->Show();
|
||||||
#else
|
#else
|
||||||
// Show the installer window without EULA.
|
// Show the installer window without EULA.
|
||||||
|
|||||||
@@ -302,9 +302,7 @@ InstallerWindow::FrameResized(float width, float height)
|
|||||||
// assume that the first frame event is because of this adoption and
|
// assume that the first frame event is because of this adoption and
|
||||||
// move ourselves to the screen center...
|
// move ourselves to the screen center...
|
||||||
fNeedsToCenterOnScreen = false;
|
fNeedsToCenterOnScreen = false;
|
||||||
BRect frame = BScreen(this).Frame();
|
CenterOnScreen();
|
||||||
MoveTo(frame.left + (frame.Width() - Frame().Width()) / 2,
|
|
||||||
frame.top + (frame.Height() - Frame().Height()) / 2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user