From d35fa55790cd7fc6e0dcd61d0e726a65e84a9bbf Mon Sep 17 00:00:00 2001 From: Matthew Wilber Date: Sat, 29 Jan 2005 17:32:26 +0000 Subject: [PATCH] Fixed drawing and placement of buttons on Alert box. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11126 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Alert.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/kits/interface/Alert.cpp b/src/kits/interface/Alert.cpp index 62ad9d2bec..bbd803a785 100644 --- a/src/kits/interface/Alert.cpp +++ b/src/kits/interface/Alert.cpp @@ -47,13 +47,15 @@ #include #include +#include // Project Includes ------------------------------------------------------------ // Local Includes -------------------------------------------------------------- // Local Defines --------------------------------------------------------------- -#define DEFAULT_RECT BRect(100, 100, 100, 100) +// Default size of the Alert window. +#define DEFAULT_RECT BRect(0, 0, 320, 75) #define max(LHS, RHS) ((LHS) > (RHS) ? (LHS) : (RHS)) // Globals --------------------------------------------------------------------- @@ -520,7 +522,7 @@ void BAlert::InitObject(const char* text, const char* button0, // in AttachedToWindow() for (int i = 0; i < buttonCount; ++i) { - MasterView->AddChild(fButtons[i]); + AddChild(fButtons[i]); } for (int i = buttonCount - 1; i >= 0; --i) @@ -616,7 +618,7 @@ void BAlert::InitObject(const char* text, const char* button0, TextViewRect, B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW); AddChild(MasterView); - MasterView->AddChild(fTextView); + AddChild(fTextView); fTextView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); fTextView->SetText(text, strlen(text));