Adjust MusicCollection app for changes in BALMLayout.
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
#include <NaturalCompare.h>
|
#include <NaturalCompare.h>
|
||||||
|
|
||||||
#include "ALMLayout.h"
|
#include "ALMLayout.h"
|
||||||
|
#include "ALMLayoutBuilder.h"
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -204,10 +205,6 @@ MusicCollectionWindow::MusicCollectionWindow(BRect frame, const char* title)
|
|||||||
:
|
:
|
||||||
BWindow(frame, title, B_DOCUMENT_WINDOW, B_AVOID_FRONT)
|
BWindow(frame, title, B_DOCUMENT_WINDOW, B_AVOID_FRONT)
|
||||||
{
|
{
|
||||||
BView* rootView = new BView(Bounds(), NULL, B_FOLLOW_ALL, B_WILL_DRAW);
|
|
||||||
AddChild(rootView);
|
|
||||||
rootView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
|
||||||
|
|
||||||
fQueryField = new BTextControl("Search: ", "", NULL);
|
fQueryField = new BTextControl("Search: ", "", NULL);
|
||||||
fQueryField->SetExplicitAlignment(BAlignment(B_ALIGN_HORIZONTAL_CENTER,
|
fQueryField->SetExplicitAlignment(BAlignment(B_ALIGN_HORIZONTAL_CENTER,
|
||||||
B_ALIGN_USE_FULL_HEIGHT));
|
B_ALIGN_USE_FULL_HEIGHT));
|
||||||
@@ -220,16 +217,14 @@ MusicCollectionWindow::MusicCollectionWindow(BRect frame, const char* title)
|
|||||||
BScrollView* scrollView = new BScrollView("list scroll", fFileListView, 0,
|
BScrollView* scrollView = new BScrollView("list scroll", fFileListView, 0,
|
||||||
true, true, B_PLAIN_BORDER);
|
true, true, B_PLAIN_BORDER);
|
||||||
|
|
||||||
float spacing = be_control_look->DefaultItemSpacing() / 2;
|
BALMLayout* layout = new BALMLayout(B_USE_ITEM_SPACING, B_USE_ITEM_SPACING);
|
||||||
BALMLayout* layout = new BALMLayout(spacing);
|
BALM::BALMLayoutBuilder(this, layout)
|
||||||
layout->SetInset(spacing);
|
.SetInsets(B_USE_WINDOW_INSETS)
|
||||||
rootView->SetLayout(layout);
|
.Add(fQueryField, layout->Left(), layout->Top())
|
||||||
|
.StartingAt(fQueryField)
|
||||||
layout->AddView(fQueryField, layout->Left(), layout->Top());
|
.AddToRight(fCountView, layout->Right())
|
||||||
layout->AddViewToRight(fCountView, layout->Right());
|
.AddBelow(scrollView, layout->Bottom(), layout->Left(),
|
||||||
layout->AddView(scrollView, layout->Left(),
|
layout->Right());
|
||||||
layout->AreaFor(fQueryField)->Bottom(), layout->Right(),
|
|
||||||
layout->Bottom());
|
|
||||||
|
|
||||||
Area* area = layout->AreaFor(scrollView);
|
Area* area = layout->AreaFor(scrollView);
|
||||||
area->SetLeftInset(0);
|
area->SetLeftInset(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user