Backgrounds: Line up BBox top borders refactor

Found an AddStrut() method that eliminates the need for the ugly
CreateVerticalStut() call. This approximately matches what I did
in Screen Preferences to line up the BBox's there.

I've reverted my previous commit and redid the code to make
the history as nice as possible but my main concern is to make the
code as nice as possible.
This commit is contained in:
John Scipione 2013-06-02 17:56:49 -04:00
parent 67a0c8e7ac
commit 38a0042248

View File

@ -211,7 +211,11 @@ BackgroundsView::BackgroundsView()
AddChild(BLayoutBuilder::Group<>(B_VERTICAL)
.AddGroup(B_HORIZONTAL)
.Add(previewBox)
.AddGroup(B_VERTICAL, 0)
.AddStrut(floorf(rightbox->TopBorderOffset()
- previewBox->TopBorderOffset()) - 1)
.Add(previewBox)
.End()
.Add(rightbox)
.End()
.AddGroup(B_HORIZONTAL)