X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/187c183c6a57140886bac1c93cb42b93aa5f4e29..16990160f6e32ea6ee7f51252d8e4651a6dc9901:/src/univ/slider.cpp?ds=sidebyside diff --git a/src/univ/slider.cpp b/src/univ/slider.cpp index 8361ab7d54..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;