Resolved a couple minor TODOs to use layout friendly constructors, which have

become available meanwhile.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29233 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2009-02-16 12:19:04 +00:00
parent 3c13a5f5b3
commit 2387efafa3
1 changed files with 9 additions and 16 deletions

View File

@ -236,37 +236,30 @@ void MidiPlayerWindow::CreateViews()
// Set up needed views // Set up needed views
scopeView = new ScopeView; scopeView = new ScopeView;
showScope = new BCheckBox( showScope = new BCheckBox("showScope", "Scope",
BRect(0, 0, 1, 1), "showScope", "Scope", new BMessage(MSG_SHOW_SCOPE));
new BMessage(MSG_SHOW_SCOPE), B_FOLLOW_LEFT);
showScope->SetValue(B_CONTROL_ON); showScope->SetValue(B_CONTROL_ON);
CreateInputMenu(); CreateInputMenu();
CreateReverbMenu(); CreateReverbMenu();
volumeSlider = new BSlider( volumeSlider = new BSlider("volumeSlider", NULL, NULL, 0, 100,
BRect(0, 0, 1, 1), "volumeSlider", NULL, NULL, B_HORIZONTAL);
0, 100, B_TRIANGLE_THUMB);
rgb_color col = { 152, 152, 255 }; rgb_color col = { 152, 152, 255 };
volumeSlider->UseFillColor(true, &col); volumeSlider->UseFillColor(true, &col);
volumeSlider->SetModificationMessage(new BMessage(MSG_VOLUME)); volumeSlider->SetModificationMessage(new BMessage(MSG_VOLUME));
playButton = new BButton( playButton = new BButton("playButton", "Play", new BMessage(MSG_PLAY_STOP));
BRect(0, 1, 80, 1), "playButton", "Play", new BMessage(MSG_PLAY_STOP),
B_FOLLOW_RIGHT);
playButton->SetEnabled(false); playButton->SetEnabled(false);
BBox* divider = new BBox( BBox* divider = new BBox(B_EMPTY_STRING, B_WILL_DRAW | B_FRAME_EVENTS,
BRect(0, 0, 1, 1), B_EMPTY_STRING, B_FOLLOW_ALL_SIDES, B_FANCY_BORDER);
B_WILL_DRAW | B_FRAME_EVENTS, B_FANCY_BORDER);
divider->SetExplicitMaxSize( divider->SetExplicitMaxSize(
BSize(B_SIZE_UNLIMITED, 1)); BSize(B_SIZE_UNLIMITED, 1));
BStringView* volumeLabel = new BStringView( BStringView* volumeLabel = new BStringView(NULL, "Volume:");
BRect(0, 0, 1, 1), NULL, "Volume:");
volumeLabel->SetAlignment(B_ALIGN_LEFT); volumeLabel->SetAlignment(B_ALIGN_LEFT);
volumeLabel->SetExplicitMaxSize( volumeLabel->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET));
BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET));
// Build the layout // Build the layout
SetLayout(new BGroupLayout(B_HORIZONTAL)); SetLayout(new BGroupLayout(B_HORIZONTAL));