Tracker InfoWindow: improve layout

Fixes #16053

Change-Id: I4ab2321d5e6f1b63d39cad6acd35b75cda43b89f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2732
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
Adrien Destugues 2020-05-17 21:53:43 +02:00 committed by Adrien Destugues
parent 9495126984
commit c1cd7f0633

View File

@ -179,35 +179,37 @@ FilePermissionsView::FilePermissionsView(BRect rect, Model* model)
fGroupTextControl = new BTextControl("", B_TRANSLATE("Group"), "",
new BMessage(kNewGroupEntered));
BGroupLayout* groupLayout = new BGroupLayout(B_HORIZONTAL);
BGroupLayout* groupLayout = new BGroupLayout(B_VERTICAL);
SetLayout(groupLayout);
BLayoutBuilder::Group<>(groupLayout)
.SetInsets(B_USE_DEFAULT_SPACING)
.AddGrid(B_USE_SMALL_SPACING, B_USE_SMALL_SPACING)
.Add(ownerRightLabel, 1, 0)
.Add(groupRightLabel, 2, 0)
.Add(otherRightLabel, 3, 0)
.Add(readLabel, 0, 1)
.Add(writeLabel, 0, 2)
.Add(executeLabel, 0, 3)
.Add(fReadUserCheckBox, 1, 1)
.Add(fReadGroupCheckBox, 2, 1)
.Add(fReadOtherCheckBox, 3, 1)
.Add(fWriteUserCheckBox, 1, 2)
.Add(fWriteGroupCheckBox, 2, 2)
.Add(fWriteOtherCheckBox, 3, 2)
.Add(fExecuteUserCheckBox, 1, 3)
.Add(fExecuteGroupCheckBox, 2, 3)
.Add(fExecuteOtherCheckBox, 3, 3)
.AddGlue(0, 4)
.End()
.AddGrid(B_USE_SMALL_SPACING, B_USE_SMALL_SPACING)
.AddGlue(0, 0)
.AddTextControl(fOwnerTextControl, 0, 1)
.AddTextControl(fGroupTextControl, 0, 2)
.AddGlue(0, 3)
.AddGroup(B_HORIZONTAL)
.SetInsets(B_USE_DEFAULT_SPACING)
.AddGrid(B_USE_SMALL_SPACING, B_USE_SMALL_SPACING)
.Add(ownerRightLabel, 1, 0)
.Add(groupRightLabel, 2, 0)
.Add(otherRightLabel, 3, 0)
.Add(readLabel, 0, 1)
.Add(writeLabel, 0, 2)
.Add(executeLabel, 0, 3)
.Add(fReadUserCheckBox, 1, 1)
.Add(fReadGroupCheckBox, 2, 1)
.Add(fReadOtherCheckBox, 3, 1)
.Add(fWriteUserCheckBox, 1, 2)
.Add(fWriteGroupCheckBox, 2, 2)
.Add(fWriteOtherCheckBox, 3, 2)
.Add(fExecuteUserCheckBox, 1, 3)
.Add(fExecuteGroupCheckBox, 2, 3)
.Add(fExecuteOtherCheckBox, 3, 3)
.AddGlue(0, 4)
.End()
.AddGrid(B_USE_SMALL_SPACING, B_USE_SMALL_SPACING)
.AddGlue(0, 0)
.AddTextControl(fOwnerTextControl, 0, 1)
.AddTextControl(fGroupTextControl, 0, 2)
.End()
.AddGlue()
.End()
.AddGlue();