Skip to content

Commit

Permalink
Gravity: Use LayoutBuilder directly on view
Browse files Browse the repository at this point in the history
  • Loading branch information
jscipione committed Apr 13, 2016
1 parent 263e936 commit ebfc2fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/add-ons/screen_savers/gravity/ConfigView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ ConfigView::ConfigView(BRect frame, Gravity* parent)
fShadeList(new BListView(B_EMPTY_STRING, B_SINGLE_SELECTION_LIST,
B_WILL_DRAW | B_NAVIGABLE))
{
SetLayout(new BGroupLayout(B_HORIZONTAL));
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);

fShadeList->SetSelectionMessage(new BMessage(kMsgShade));
Expand All @@ -62,15 +61,16 @@ ConfigView::ConfigView(BRect frame, Gravity* parent)
fCountSlider->SetModificationMessage(new BMessage(kMsgSize));
fCountSlider->SetValue(parent->Config.ParticleCount);

AddChild(BLayoutBuilder::Group<>(B_VERTICAL, B_USE_DEFAULT_SPACING)
BLayoutBuilder::Group<>(this, B_VERTICAL, B_USE_DEFAULT_SPACING)
.AddGroup(B_VERTICAL, 0)
.Add(fTitleString)
.Add(fAuthorString)
.End()
.Add(fShadeString)
.Add(fShadeScroll)
.Add(fCountSlider)
.SetInsets(B_USE_DEFAULT_SPACING));
.SetInsets(B_USE_DEFAULT_SPACING)
.End();
}


Expand Down

0 comments on commit ebfc2fc

Please sign in to comment.