Author: czeidler Date: 2009-10-04 21:48:03 +0200 (Sun, 04 Oct 2009) New Revision: 33425 Changeset: http://dev.haiku-os.org/changeset/33425/haiku Modified: haiku/trunk/src/apps/powerstatus/ExtendedInfoWindow.cpp Log: Use the new CenterOnScreen function to center the window. Modified: haiku/trunk/src/apps/powerstatus/ExtendedInfoWindow.cpp =================================================================== --- haiku/trunk/src/apps/powerstatus/ExtendedInfoWindow.cpp 2009-10-04 18:23:55 UTC (rev 33424) +++ haiku/trunk/src/apps/powerstatus/ExtendedInfoWindow.cpp 2009-10-04 19:48:03 UTC (rev 33425) @@ -84,13 +84,7 @@ void BatteryInfoView::AttachedToWindow() { - BRect rect = BScreen().Frame(); - BRect windowFrame = Window()->Frame(); - BPoint position; - // center window on screen - position.x = (rect.Width() - windowFrame.Width()) / 2; - position.y = (rect.Height() - windowFrame.Height()) / 2; - Window()->MoveTo(position); + Window()->CenterOnScreen(); }