mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-05 04:05:34 +00:00
Revert "fix for scrollviews being drawn below window resize indicator."
This reverts commit 18a0deb678.
This commit is contained in:
1 parent
da725f6ffc
commit
149308bc89
1 file changed
+3
-16
+3
-16
@@ -229,19 +229,6 @@
|
||||
if (shouldShowHorizontalScroller)
|
||||
contentFrame.size.height -= horizontalScrollerHeight;
|
||||
|
||||
var _window = [self window],
|
||||
forceCornerSpace = NO;
|
||||
|
||||
if (_window && [_window contentView])
|
||||
{
|
||||
var windowIsResizable = !!(([_window styleMask] & CPResizableWindowMask) || ([_window styleMask] & CPBorderlessBridgeWindowMask)),
|
||||
relativeFrame = [self convertRect:[[_window contentView] frame] fromView:nil],
|
||||
maxPoint = CGPointMake(CGRectGetMaxX([self bounds]), CGRectGetMaxY([self bounds])),
|
||||
isInWindowCorner = CGRectGetMaxX(relativeFrame) >= maxPoint.x && CGRectGetMaxY(relativeFrame) >= maxPoint.y;
|
||||
|
||||
forceCornerSpace = windowIsResizable && isInWindowCorner;
|
||||
}
|
||||
|
||||
var scrollPoint = [_contentView bounds].origin,
|
||||
wasShowingVerticalScroller = ![_verticalScroller isHidden],
|
||||
wasShowingHorizontalScroller = ![_horizontalScroller isHidden];
|
||||
@@ -251,7 +238,7 @@
|
||||
var verticalScrollerY = MAX(_CGRectGetHeight([self _cornerViewFrame]), headerClipViewHeight),
|
||||
verticalScrollerHeight = _CGRectGetHeight([self bounds]) - verticalScrollerY;
|
||||
|
||||
if (forceCornerSpace || shouldShowHorizontalScroller)
|
||||
if (shouldShowHorizontalScroller)
|
||||
verticalScrollerHeight -= horizontalScrollerHeight;
|
||||
|
||||
[_verticalScroller setFloatValue:(difference.height <= 0.0) ? 0.0 : scrollPoint.y / difference.height];
|
||||
@@ -268,7 +255,7 @@
|
||||
{
|
||||
[_horizontalScroller setFloatValue:(difference.width <= 0.0) ? 0.0 : scrollPoint.x / difference.width];
|
||||
[_horizontalScroller setKnobProportion:_CGRectGetWidth(contentFrame) / _CGRectGetWidth(documentFrame)];
|
||||
[_horizontalScroller setFrame:_CGRectMake(0.0, _CGRectGetMaxY(contentFrame), _CGRectGetWidth(contentFrame) - ((!shouldShowVerticalScroller && forceCornerSpace) ? verticalScrollerWidth : 0), horizontalScrollerHeight)];
|
||||
[_horizontalScroller setFrame:_CGRectMake(0.0, _CGRectGetMaxY(contentFrame), _CGRectGetWidth(contentFrame), horizontalScrollerHeight)];
|
||||
}
|
||||
else if (wasShowingHorizontalScroller)
|
||||
{
|
||||
@@ -806,4 +793,4 @@ var CPScrollViewContentViewKey = "CPScrollViewContentView",
|
||||
[aCoder encodeObject:_cornerView forKey:CPScrollViewCornerViewKey];
|
||||
}
|
||||
|
||||
@end
|
||||
@end
|
||||
Reference in new issue
Block a user