FileTypes: ensure there is enough space to display app info

Fixes #15793
This commit is contained in:
Adrien Destugues 2020-05-10 11:53:13 +02:00
parent 12e4ac5d81
commit 93f6ca70a8
2 changed files with 4 additions and 8 deletions

View File

@ -493,14 +493,12 @@ ApplicationTypeWindow::ApplicationTypeWindow(BPoint position,
BLayoutBuilder::Grid<>(versionBox, padding / 2, padding / 2)
.SetInsets(padding, padding * 2, padding, padding)
.Add(fMajorVersionControl->CreateLabelLayoutItem(), 0, 0)
.Add(fMajorVersionControl->CreateTextViewLayoutItem(), 1, 0)
.AddTextControl(fMajorVersionControl, 0, 0)
.Add(fMiddleVersionControl, 2, 0, 2)
.Add(fMinorVersionControl, 4, 0, 2)
.Add(varietyField, 6, 0, 3)
.Add(fInternalVersionControl, 9, 0, 2)
.Add(fShortDescriptionControl->CreateLabelLayoutItem(), 0, 1)
.Add(fShortDescriptionControl->CreateTextViewLayoutItem(), 1, 1, 10)
.AddTextControl(fShortDescriptionControl, 0, 1)
.Add(longLabel, 0, 2)
.Add(scrollView, 1, 2, 10, 3)
.SetRowWeight(3, 3);

View File

@ -170,10 +170,6 @@ ApplicationTypesWindow::ApplicationTypesWindow(const BMessage& settings)
fTypeListView = new MimeTypeListView("listview", "application", true, true);
fTypeListView->SetSelectionMessage(new BMessage(kMsgTypeSelected));
fTypeListView->SetInvocationMessage(new BMessage(kMsgTypeInvoked));
// TODO: this isn't the perfect solution, but otherwise the window contents
// will jump chaotically
fTypeListView->SetExplicitMinSize(BSize(200, B_SIZE_UNSET));
fTypeListView->SetExplicitMaxSize(BSize(250, B_SIZE_UNSET));
BScrollView* scrollView = new BScrollView("scrollview", fTypeListView,
B_FRAME_EVENTS | B_WILL_DRAW, false, true);
@ -193,6 +189,8 @@ ApplicationTypesWindow::ApplicationTypesWindow(const BMessage& settings)
fSignatureView = new StringView(B_TRANSLATE("Signature:"), NULL);
fSignatureView->TextView()->SetExplicitAlignment(labelAlignment);
fSignatureView->LabelView()->SetExplicitAlignment(labelAlignment);
fSignatureView->TextView()->SetExplicitMinSize(BSize(
fSignatureView->TextView()->StringWidth("M") * 42, B_SIZE_UNSET));
fPathView = new StringView(B_TRANSLATE("Path:"), NULL);
fPathView->TextView()->SetExplicitAlignment(labelAlignment);
fPathView->LabelView()->SetExplicitAlignment(labelAlignment);