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
This commit is contained in:
@@ -47,13 +47,15 @@
|
|||||||
#include <Beep.h>
|
#include <Beep.h>
|
||||||
|
|
||||||
#include <Autolock.h>
|
#include <Autolock.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
// Project Includes ------------------------------------------------------------
|
// Project Includes ------------------------------------------------------------
|
||||||
|
|
||||||
// Local Includes --------------------------------------------------------------
|
// Local Includes --------------------------------------------------------------
|
||||||
|
|
||||||
// Local Defines ---------------------------------------------------------------
|
// 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))
|
#define max(LHS, RHS) ((LHS) > (RHS) ? (LHS) : (RHS))
|
||||||
|
|
||||||
// Globals ---------------------------------------------------------------------
|
// Globals ---------------------------------------------------------------------
|
||||||
@@ -520,7 +522,7 @@ void BAlert::InitObject(const char* text, const char* button0,
|
|||||||
// in AttachedToWindow()
|
// in AttachedToWindow()
|
||||||
for (int i = 0; i < buttonCount; ++i)
|
for (int i = 0; i < buttonCount; ++i)
|
||||||
{
|
{
|
||||||
MasterView->AddChild(fButtons[i]);
|
AddChild(fButtons[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = buttonCount - 1; i >= 0; --i)
|
for (int i = buttonCount - 1; i >= 0; --i)
|
||||||
@@ -616,7 +618,7 @@ void BAlert::InitObject(const char* text, const char* button0,
|
|||||||
TextViewRect,
|
TextViewRect,
|
||||||
B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW);
|
B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW);
|
||||||
AddChild(MasterView);
|
AddChild(MasterView);
|
||||||
MasterView->AddChild(fTextView);
|
AddChild(fTextView);
|
||||||
|
|
||||||
fTextView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
fTextView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
fTextView->SetText(text, strlen(text));
|
fTextView->SetText(text, strlen(text));
|
||||||
|
|||||||
Reference in New Issue
Block a user