wxScrollThumb::Shaft wxSlider::HitTest(const wxPoint& pt) const
{
wxRect rectShaft = GetShaftRect();
- if ( !rectShaft.Inside(pt) )
+ wxRect rectThumb;
+ CalcThumbRect(&rectShaft, &rectThumb, NULL);
+
+ // check for possible shaft or thumb hit
+ if (!rectShaft.Inside(pt) && !rectThumb.Inside(pt))
{
return wxScrollThumb::Shaft_None;
}
- // inside the shaft, where is it relatively to the thumb?
- wxRect rectThumb;
- CalcThumbRect(&rectShaft, &rectThumb, NULL);
// the position to test and the start and end of the thumb
wxCoord x, x1, x2;
break;
case WXK_PRIOR:
+ case WXK_PAGEUP:
action = wxACTION_SLIDER_PAGE_UP;
break;
case WXK_NEXT:
+ case WXK_PAGEDOWN:
action = wxACTION_SLIDER_PAGE_DOWN;
break;
}