From 63c500c4443c08b324a792dcdd5c7c01bcd17b38 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Thu, 27 Oct 2011 15:57:29 +0100 Subject: [PATCH] Fixed: overlay scroll knobs never quite reached the edge. The calculation of the number of pixels outside of the clip view assumed fixed, space consuming scrollbars even when overlay scrollbars were used, leading CPScrollView to always think a few more pixels could be revealed. --- AppKit/CPScrollView.j | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AppKit/CPScrollView.j b/AppKit/CPScrollView.j index cf8a52a97..764b9a66d 100644 --- a/AppKit/CPScrollView.j +++ b/AppKit/CPScrollView.j @@ -1090,14 +1090,16 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay, // Now we have to account for the shown scrollers affecting the deltas. if (shouldShowVerticalScroller) { - difference.width += verticalScrollerWidth; + if (_scrollerStyle === CPScrollerStyleLegacy) + difference.width += verticalScrollerWidth; hasHorizontalScroll = difference.width > 0.0; shouldShowHorizontalScroller = _hasHorizontalScroller && (!_autohidesScrollers || hasHorizontalScroll); } if (shouldShowHorizontalScroller) { - difference.height += horizontalScrollerHeight; + if (_scrollerStyle === CPScrollerStyleLegacy) + difference.height += horizontalScrollerHeight; hasVerticalScroll = difference.height > 0.0; shouldShowVerticalScroller = _hasVerticalScroller && (!_autohidesScrollers || hasVerticalScroll); }