From 38a0042248c6fa4a06b7ec2525b0df00e48994b5 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Sun, 2 Jun 2013 17:56:49 -0400 Subject: [PATCH] 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. --- src/preferences/backgrounds/BackgroundsView.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/preferences/backgrounds/BackgroundsView.cpp b/src/preferences/backgrounds/BackgroundsView.cpp index 7718482664..2e3f6a1f09 100644 --- a/src/preferences/backgrounds/BackgroundsView.cpp +++ b/src/preferences/backgrounds/BackgroundsView.cpp @@ -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)