X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23645bfa01b6450257f140a30c87565225b1ef4a..2d4e4f802f8a165c8d41053d2cd6d33c32b08f79:/src/univ/slider.cpp diff --git a/src/univ/slider.cpp b/src/univ/slider.cpp index bae3e993b5..8381f531a6 100644 --- a/src/univ/slider.cpp +++ b/src/univ/slider.cpp @@ -787,14 +787,15 @@ bool wxSlider::PerformAction(const wxControlAction& action, 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; @@ -946,10 +947,12 @@ bool wxStdSliderButtonInputHandler::HandleKey(wxInputConsumer *consumer, 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; }