]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/slider.cpp
use MoreFilesX instead of MoreFiles when building with Apple Developer Tools
[wxWidgets.git] / src / univ / slider.cpp
index bae3e993b51f7760253d1b419ec3273fd0a52816..8381f531a6a514e35545211aeba6f4d8dabe6d2a 100644 (file)
@@ -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;
         }