From dc052c4305d5ad360a104e619184cf682b1b7300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 22 May 2006 16:49:24 +0000 Subject: [PATCH] The alert window position code now also takes an eventual screen offset into account. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17537 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Alert.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kits/interface/Alert.cpp b/src/kits/interface/Alert.cpp index db1e05a19b..bf418c65a1 100644 --- a/src/kits/interface/Alert.cpp +++ b/src/kits/interface/Alert.cpp @@ -428,15 +428,15 @@ BAlert::AlertPosition(float width, float height) dynamic_cast(BLooper::LooperForThread(find_thread(NULL))); BScreen screen(window); - BRect screenRect(0, 0, 640, 480); + BRect screenFrame(0, 0, 640, 480); if (screen.IsValid()) - screenRect = screen.Frame(); + screenFrame = screen.Frame(); // Horizontally, we're smack in the middle - result.x = (screenRect.Width() / 2.0) - (width / 2.0); + result.x = screenFrame.left + (screenFrame.Width() / 2.0) - (width / 2.0); // This is probably sooo wrong, but it looks right on 1024 x 768 - result.y = (screenRect.Height() / 4.0) - ceil(height / 3.0); + result.y = screenFrame.top + (screenFrame.Height() / 4.0) - ceil(height / 3.0); return result; }