BScrollView: Take both minimum dimensions of scrollbars into account.

Fixes #5678.
This commit is contained in:
Augustin Cavalier
2023-05-31 13:33:50 -04:00
parent bfd3d33765
commit 269de6acca
+6 -2
View File
@@ -916,10 +916,14 @@ BScrollView::_AlignScrollBars(bool horizontal, bool vertical, BRect targetFrame)
BScrollView::_ComputeFrame(BRect frame, BScrollBar* horizontal,
BScrollBar* vertical, border_style border, uint32 borders)
{
if (vertical != NULL)
if (vertical != NULL) {
frame.right += vertical->PreferredSize().Width();
if (horizontal != NULL)
frame.bottom += vertical->MinSize().Height();
}
if (horizontal != NULL) {
frame.right += horizontal->MinSize().Width();
frame.bottom += horizontal->PreferredSize().Height();
}
_InsetBorders(frame, border, borders, true);