BScrollBar: Use the minimum as the preferred size in the alternate axis.
This was the behavior before the commit yesterday that unified the two methods of computing the preferred size. It seems some applications expect this to be callable without a window lock, so this works when the other method does not. Fixes #16372.
This commit is contained in:
@@ -999,10 +999,10 @@ BScrollBar::GetPreferredSize(float* _width, float* _height)
|
|||||||
*_width = B_V_SCROLL_BAR_WIDTH * scale;
|
*_width = B_V_SCROLL_BAR_WIDTH * scale;
|
||||||
|
|
||||||
if (_height)
|
if (_height)
|
||||||
*_height = Bounds().Height();
|
*_height = _MinSize().Height();
|
||||||
} else if (fOrientation == B_HORIZONTAL) {
|
} else if (fOrientation == B_HORIZONTAL) {
|
||||||
if (_width)
|
if (_width)
|
||||||
*_width = Bounds().Width();
|
*_width = _MinSize().Width();
|
||||||
|
|
||||||
if (_height)
|
if (_height)
|
||||||
*_height = B_H_SCROLL_BAR_HEIGHT * scale;
|
*_height = B_H_SCROLL_BAR_HEIGHT * scale;
|
||||||
|
|||||||
Reference in New Issue
Block a user