]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/scrolbar.cpp
fixed crash in HitTest() with y position below the last line
[wxWidgets.git] / src / mac / carbon / scrolbar.cpp
index 92d6dd1fafe7b9b1f1c27a2b6774ab810d21420f..e9d45ce4e5838b3c1760966e0632ce8cd9412c3a 100644 (file)
@@ -13,6 +13,8 @@
 #pragma implementation "scrolbar.h"
 #endif
 
+#include "wx/defs.h"
+
 #include "wx/scrolbar.h"
 #include "wx/mac/uma.h"
 
@@ -82,9 +84,10 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS
 
     if ( UMAGetAppearanceVersion() >= 0x0110  )
     {
-#if UMA_USE_8_6        
+        if ( SetControlViewSize != (void*) kUnresolvedCFragSymbolAddress )
+        {
                        SetControlViewSize( m_macControl , m_pageSize ) ;
-#endif
+        }
     }
     Refresh() ;
 }
@@ -111,19 +114,19 @@ void wxScrollBar::MacHandleControlClick( ControlHandle control , SInt16 controlp
        switch( controlpart )
        {
                case kControlUpButtonPart :
-        nScrollInc = -1;
+        nScrollInc = -m_pageSize;
         scrollEvent = wxEVT_SCROLL_LINEUP;
                        break ;
                case kControlDownButtonPart :
-        nScrollInc = 1;
+        nScrollInc = m_pageSize;
         scrollEvent = wxEVT_SCROLL_LINEDOWN;
                        break ;
                case kControlPageUpPart :
-        nScrollInc = -m_pageSize;
+        nScrollInc = -m_viewSize;
         scrollEvent = wxEVT_SCROLL_PAGEUP;
                        break ;
                case kControlPageDownPart :
-        nScrollInc = m_pageSize;
+        nScrollInc = m_viewSize;
         scrollEvent = wxEVT_SCROLL_PAGEDOWN;
                        break ;
                case kControlIndicatorPart :