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->SetExplicitMinSize(BSize(0, 0));
|
||||||
button1->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNLIMITED));
|
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
|
// create a new BALMLayout and use it for this window
|
||||||
BALMLayout* layout = new BALMLayout();
|
BALMLayout* layout = new BALMLayout();
|
||||||
|
@ -37,25 +39,20 @@ public:
|
||||||
a1->SetLeftInset(10);
|
a1->SetLeftInset(10);
|
||||||
a1->SetRightInset(10);
|
a1->SetRightInset(10);
|
||||||
|
|
||||||
Area* a2 = layout->AddArea(
|
layout->AddArea(layout->Left(), y1, layout->Right(), y2, button2);
|
||||||
layout->Left(), y1,
|
button2->SetExplicitAlignment(
|
||||||
layout->Right(), y2,
|
BAlignment(B_ALIGN_LEFT, B_ALIGN_TOP));
|
||||||
button2);
|
|
||||||
a2->SetHorizontalAlignment(B_ALIGN_LEFT);
|
|
||||||
|
|
||||||
Area* a3 = layout->AddArea(
|
Area* a3 = layout->AddArea(layout->Left(), y2, layout->Right(), y3,
|
||||||
layout->Left(), y2,
|
|
||||||
layout->Right(), y3,
|
|
||||||
button3);
|
button3);
|
||||||
a3->SetHorizontalAlignment(B_ALIGN_HORIZONTAL_CENTER);
|
button3->SetExplicitAlignment(
|
||||||
a3->SetVerticalAlignment(B_ALIGN_VERTICAL_CENTER);
|
BAlignment(B_ALIGN_HORIZONTAL_CENTER, B_ALIGN_VERTICAL_CENTER));
|
||||||
a3->HasSameHeightAs(a1);
|
a3->HasSameHeightAs(a1);
|
||||||
|
|
||||||
Area* a4 = layout->AddArea(
|
layout->AddArea(layout->Left(), y3, layout->Right(), layout->Bottom(),
|
||||||
layout->Left(), y3,
|
|
||||||
layout->Right(), layout->Bottom(),
|
|
||||||
button4);
|
button4);
|
||||||
a4->SetHorizontalAlignment(B_ALIGN_RIGHT);
|
button4->SetExplicitAlignment(
|
||||||
|
BAlignment(B_ALIGN_RIGHT, B_ALIGN_BOTTOM));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -30,19 +30,17 @@ public:
|
||||||
r2->InsertAfter(r1);
|
r2->InsertAfter(r1);
|
||||||
|
|
||||||
BButton* b1 = new BButton("A1");
|
BButton* b1 = new BButton("A1");
|
||||||
Area* a1 = layout->AddArea(r1, c1, b1);
|
layout->AddArea(r1, c1, b1);
|
||||||
a1->SetHorizontalAlignment(B_ALIGN_LEFT);
|
b1->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT, B_ALIGN_TOP));
|
||||||
a1->SetVerticalAlignment(B_ALIGN_TOP);
|
|
||||||
|
|
||||||
BButton* b2 = new BButton("A2");
|
BButton* b2 = new BButton("A2");
|
||||||
Area* a2 = layout->AddArea(r2, c1, b2);
|
layout->AddArea(r2, c1, b2);
|
||||||
a2->SetHorizontalAlignment(B_ALIGN_HORIZONTAL_CENTER);
|
b2->SetExplicitAlignment(BAlignment(
|
||||||
a2->SetVerticalAlignment(B_ALIGN_VERTICAL_CENTER);
|
B_ALIGN_HORIZONTAL_CENTER, B_ALIGN_VERTICAL_CENTER));
|
||||||
|
|
||||||
BButton* b3 = new BButton("A3");
|
BButton* b3 = new BButton("A3");
|
||||||
Area* a3 = layout->AddArea(r3, c1, b3);
|
layout->AddArea(r3, c1, b3);
|
||||||
a3->SetHorizontalAlignment(B_ALIGN_RIGHT);
|
b3->SetExplicitAlignment(BAlignment(B_ALIGN_RIGHT, B_ALIGN_BOTTOM));
|
||||||
a3->SetVerticalAlignment(B_ALIGN_BOTTOM);
|
|
||||||
|
|
||||||
r2->HasSameHeightAs(r1);
|
r2->HasSameHeightAs(r1);
|
||||||
r3->HasSameHeightAs(r1);
|
r3->HasSameHeightAs(r1);
|
||||||
|
|
Loading…
Reference in New Issue