In my BSlider changes, I changed the behavior of GetPreferredSize(), which

previously did never shrink the slider horizontally. This broke a couple
apps, so I added it back, although I don't quite agree that this is the correct
behavior. Apps using the new layout system are not affected though, so I
guess it is alright. Should fix #2530, although I didn't test it yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26502 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2008-07-19 12:39:14 +00:00
parent fa55277509
commit 85db8e8380

View File

@ -1300,8 +1300,13 @@ BSlider::GetPreferredSize(float* _width, float* _height)
{
BSize preferredSize = PreferredSize();
if (_width)
*_width = preferredSize.width;
if (_width) {
// *_width = preferredSize.width;
// NOTE: For compatibility reasons, the BSlider never shrinks
// horizontally. This only affects applications which do not
// use the new layout system.
*_width = max_c(Bounds().Width(), preferredSize.width);
}
if (_height)
*_height = preferredSize.height;