Tracker: fix infowindow resizing

Fixes #16053
This commit is contained in:
Adrien Destugues
2020-08-05 14:40:06 +02:00
parent 2c09e0dc7f
commit 9027ca04e2
2 changed files with 11 additions and 1 deletions
@@ -472,4 +472,14 @@ AttributesView::AttributesView(Model* model)
}
fListView->AddRow(row);
}
int32 rows = fListView->CountRows(NULL);
if (rows < 5)
rows = 5;
BRow* first = fListView->RowAt(0, NULL);
if (first != NULL) {
float height = first->Height() * (rows + 2);
SetExplicitMaxSize(BSize(B_SIZE_UNSET, height));
}
}
@@ -184,7 +184,7 @@ FilePermissionsView::FilePermissionsView(BRect rect, Model* model)
SetLayout(groupLayout);
BLayoutBuilder::Group<>(groupLayout)
.AddGroup(B_HORIZONTAL)
.AddGroup(B_HORIZONTAL, B_USE_DEFAULT_SPACING, 0.0f)
.SetInsets(B_USE_DEFAULT_SPACING)
.AddGrid(B_USE_SMALL_SPACING, B_USE_SMALL_SPACING)
.Add(ownerRightLabel, 1, 0)