diff --git a/src/apps/haiku-depot/MainWindow.cpp b/src/apps/haiku-depot/MainWindow.cpp index 8953f1255b7..04deabaaa18 100644 --- a/src/apps/haiku-depot/MainWindow.cpp +++ b/src/apps/haiku-depot/MainWindow.cpp @@ -314,7 +314,14 @@ MainWindow::_InitDummyModel() "will need to recompile your filters."); sequitur.AddUserRating( UserRating(UserInfo("pete"), 4.5f, - "I can weave a web of sound!", "en", "2.1.0") + "I can weave a web of sound! And it connects to PatchBay. Check " + "it out, I can wholeheartly recommend this app!! This rating " + "comment is of course only so long, because the new TextView " + "layout needs some testing. Oh, and did I mention it works with " + "custom installed sound fonts? Reading through this comment I find " + "that I did not until now. Hopefully there are enough lines now to " + "please the programmer with the text layouting and scrolling of " + "long ratings!", "en", "2.1.0") ); sequitur.AddUserRating( UserRating(UserInfo("stippi"), 3.5f, diff --git a/src/apps/haiku-depot/PackageInfoView.cpp b/src/apps/haiku-depot/PackageInfoView.cpp index 1a6eb14819f..12435dac02a 100644 --- a/src/apps/haiku-depot/PackageInfoView.cpp +++ b/src/apps/haiku-depot/PackageInfoView.cpp @@ -789,12 +789,24 @@ class RatingContainerView : public BGroupView { { BGroupView::DoLayout(); if (BScrollBar* scrollBar = ScrollBar(B_VERTICAL)) { - BSize minSize = BGroupView::MinSize(); - float height = Bounds().Height(); - float max = minSize.height - height; + BRect layoutArea = GroupLayout()->LayoutArea(); + float layoutHeight = layoutArea.Height(); + // Min size is not reliable with HasHeightForWidth() children, + // since it does not reflect how thos children are currently + // laid out, but what their theoretical minimum size would be. + + BLayoutItem* lastItem = GroupLayout()->ItemAt( + GroupLayout()->CountItems() - 1); + if (lastItem != NULL) { + layoutHeight = lastItem->Frame().bottom; + } + + float viewHeight = Bounds().Height(); + + float max = layoutHeight- viewHeight; scrollBar->SetRange(0, max); - if (minSize.height > 0) - scrollBar->SetProportion(height / minSize.height); + if (layoutHeight > 0) + scrollBar->SetProportion(viewHeight / layoutHeight); else scrollBar->SetProportion(1); }