Small oversight: clicking outside of the slider should also dismiss it. Thanks Stephan!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29569 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent
2009-03-17 12:52:32 +00:00
parent 12c0fc92e1
commit 440ef69c6b
+4 -1
View File
@@ -323,6 +323,7 @@ SliderView::SliderView(BRect rect, BMessage *msg, const char *title,
fButtonBitmap.SetBits(kButtonBits, kButtonWidth * kButtonHeight, 0, B_CMAP8); fButtonBitmap.SetBits(kButtonBits, kButtonWidth * kButtonHeight, 0, B_CMAP8);
SetValue(value); SetValue(value);
SetEventMask(B_POINTER_EVENTS, B_NO_POINTER_HISTORY);
} }
@@ -381,8 +382,10 @@ SliderView::Draw(BRect updateRect)
void void
SliderView::MouseDown(BPoint point) SliderView::MouseDown(BPoint point)
{ {
SetMouseEventMask(B_POINTER_EVENTS, B_NO_POINTER_HISTORY); if (Bounds().Contains(point))
SetTracking(true); SetTracking(true);
else
Invoke();
} }