From fd849a28d936a76e3e99c50426fa90e8791d2a45 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Tue, 22 Apr 2014 19:51:29 -0400 Subject: [PATCH] Background: Make menu fields variable width --- .../backgrounds/BackgroundsView.cpp | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/preferences/backgrounds/BackgroundsView.cpp b/src/preferences/backgrounds/BackgroundsView.cpp index 5270c2a648..3c1c1f22d8 100644 --- a/src/preferences/backgrounds/BackgroundsView.cpp +++ b/src/preferences/backgrounds/BackgroundsView.cpp @@ -189,14 +189,21 @@ BackgroundsView::BackgroundsView() new BMessage(kMsgUpdateColor)); rightbox->AddChild(BLayoutBuilder::Group<>(B_VERTICAL) - .AddGrid(B_USE_DEFAULT_SPACING, B_USE_SMALL_SPACING) - .Add(imageMenuField->CreateLabelLayoutItem(), 0, 0) - .Add(imageMenuField->CreateMenuBarLayoutItem(), 1, 0, 2, 1) - .Add(placementMenuField->CreateLabelLayoutItem(), 0, 1) - .Add(placementMenuField->CreateMenuBarLayoutItem(), 1, 1, 2, 1) - .Add(fIconLabelOutline, 1, 2) - // checkbox only spans one column so that it - // doesn't dictate the width of the menu bars. + .AddGroup(B_HORIZONTAL, 0.0f) + .AddGrid(B_USE_DEFAULT_SPACING, B_USE_SMALL_SPACING) + .Add(imageMenuField->CreateLabelLayoutItem(), 0, 0) + .AddGroup(B_HORIZONTAL, 0.0f, 1, 0) + .Add(imageMenuField->CreateMenuBarLayoutItem(), 0.0f) + .AddGlue() + .End() + .Add(placementMenuField->CreateLabelLayoutItem(), 0, 1) + .AddGroup(B_HORIZONTAL, 0.0f, 1, 1) + .Add(placementMenuField->CreateMenuBarLayoutItem(), 0.0f) + .AddGlue() + .End() + .Add(fIconLabelOutline, 1, 2) + .End() + .AddGlue() .End() .AddGlue() .Add(fPicker)