Adjust tests to use the SetExplicitAlignment function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38776 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5f15562e70
commit
a85cd05590
@ -19,6 +19,8 @@ public:
|
||||
|
||||
button1->SetExplicitMinSize(BSize(0, 0));
|
||||
button1->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNLIMITED));
|
||||
//button1->SetExplicitAlignment(
|
||||
//BAlignment(B_ALIGN_USE_FULL_WIDTH, B_ALIGN_USE_FULL_HEIGHT));
|
||||
|
||||
// create a new BALMLayout and use it for this window
|
||||
BALMLayout* layout = new BALMLayout();
|
||||
@ -37,25 +39,20 @@ public:
|
||||
a1->SetLeftInset(10);
|
||||
a1->SetRightInset(10);
|
||||
|
||||
Area* a2 = layout->AddArea(
|
||||
layout->Left(), y1,
|
||||
layout->Right(), y2,
|
||||
button2);
|
||||
a2->SetHorizontalAlignment(B_ALIGN_LEFT);
|
||||
layout->AddArea(layout->Left(), y1, layout->Right(), y2, button2);
|
||||
button2->SetExplicitAlignment(
|
||||
BAlignment(B_ALIGN_LEFT, B_ALIGN_TOP));
|
||||
|
||||
Area* a3 = layout->AddArea(
|
||||
layout->Left(), y2,
|
||||
layout->Right(), y3,
|
||||
Area* a3 = layout->AddArea(layout->Left(), y2, layout->Right(), y3,
|
||||
button3);
|
||||
a3->SetHorizontalAlignment(B_ALIGN_HORIZONTAL_CENTER);
|
||||
a3->SetVerticalAlignment(B_ALIGN_VERTICAL_CENTER);
|
||||
button3->SetExplicitAlignment(
|
||||
BAlignment(B_ALIGN_HORIZONTAL_CENTER, B_ALIGN_VERTICAL_CENTER));
|
||||
a3->HasSameHeightAs(a1);
|
||||
|
||||
Area* a4 = layout->AddArea(
|
||||
layout->Left(), y3,
|
||||
layout->Right(), layout->Bottom(),
|
||||
layout->AddArea(layout->Left(), y3, layout->Right(), layout->Bottom(),
|
||||
button4);
|
||||
a4->SetHorizontalAlignment(B_ALIGN_RIGHT);
|
||||
button4->SetExplicitAlignment(
|
||||
BAlignment(B_ALIGN_RIGHT, B_ALIGN_BOTTOM));
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -30,19 +30,17 @@ public:
|
||||
r2->InsertAfter(r1);
|
||||
|
||||
BButton* b1 = new BButton("A1");
|
||||
Area* a1 = layout->AddArea(r1, c1, b1);
|
||||
a1->SetHorizontalAlignment(B_ALIGN_LEFT);
|
||||
a1->SetVerticalAlignment(B_ALIGN_TOP);
|
||||
layout->AddArea(r1, c1, b1);
|
||||
b1->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT, B_ALIGN_TOP));
|
||||
|
||||
BButton* b2 = new BButton("A2");
|
||||
Area* a2 = layout->AddArea(r2, c1, b2);
|
||||
a2->SetHorizontalAlignment(B_ALIGN_HORIZONTAL_CENTER);
|
||||
a2->SetVerticalAlignment(B_ALIGN_VERTICAL_CENTER);
|
||||
layout->AddArea(r2, c1, b2);
|
||||
b2->SetExplicitAlignment(BAlignment(
|
||||
B_ALIGN_HORIZONTAL_CENTER, B_ALIGN_VERTICAL_CENTER));
|
||||
|
||||
BButton* b3 = new BButton("A3");
|
||||
Area* a3 = layout->AddArea(r3, c1, b3);
|
||||
a3->SetHorizontalAlignment(B_ALIGN_RIGHT);
|
||||
a3->SetVerticalAlignment(B_ALIGN_BOTTOM);
|
||||
layout->AddArea(r3, c1, b3);
|
||||
b3->SetExplicitAlignment(BAlignment(B_ALIGN_RIGHT, B_ALIGN_BOTTOM));
|
||||
|
||||
r2->HasSameHeightAs(r1);
|
||||
r3->HasSameHeightAs(r1);
|
||||
|
Loading…
Reference in New Issue
Block a user