From f779adc69286b9babc31ad311a2b8558f09c29e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Fri, 18 Jul 2008 00:06:28 +0000 Subject: [PATCH] mmlr + stippi: In my last row of changes I removed a call to ResizeToPreferred() in SetLimitLabels(). It is confirmed that the BeOS implementation is doing it and some applications rely on it, like our own Mouse preflet. This closes #2526. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26479 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Slider.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/Slider.cpp b/src/kits/interface/Slider.cpp index 9683950eb3..5aee1b59d8 100644 --- a/src/kits/interface/Slider.cpp +++ b/src/kits/interface/Slider.cpp @@ -587,6 +587,13 @@ BSlider::SetLimitLabels(const char *minLabel, const char *maxLabel) fMaxLimitLabel = maxLabel ? strdup(maxLabel) : NULL; InvalidateLayout(); + + // TODO: This is for backwards compatibility and should + // probably be removed when breaking binary compatiblity. + // Applications like our own Mouse rely on this behavior. + if ((Flags() & B_SUPPORTS_LAYOUT) == 0) + ResizeToPreferred(); + Invalidate(); } @@ -1398,7 +1405,8 @@ void BSlider::SetHashMarks(hash_mark_location where) { fHashMarks = where; - InvalidateLayout(); +// TODO: enable if the hashmark look is influencing the control size! +// InvalidateLayout(); Invalidate(); }