mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Optimise bottom corner view in overlay scrolling mode.
In particular, there is no need to update nor even draw the bottom corner view when in overlay mode.
This commit is contained in:
@@ -777,7 +777,10 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay,
|
||||
if (_timerScrollersHide)
|
||||
[_timerScrollersHide invalidate];
|
||||
_timerScrollersHide = [CPTimer scheduledTimerWithTimeInterval:CPScrollViewFadeOutTime target:self selector:@selector(_hideScrollers:) userInfo:nil repeats:NO];
|
||||
[[self bottomCornerView] setHidden:YES];
|
||||
}
|
||||
else
|
||||
[[self bottomCornerView] setHidden:NO];
|
||||
|
||||
[self reflectScrolledClipView:_contentView];
|
||||
}
|
||||
@@ -1156,8 +1159,11 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay,
|
||||
[[_headerClipView documentView] setNeedsDisplay:YES];
|
||||
[_cornerView setFrame:[self _cornerViewFrame]];
|
||||
|
||||
[[self bottomCornerView] setFrame:[self _bottomCornerViewFrame]];
|
||||
[[self bottomCornerView] setBackgroundColor:[self currentValueForThemeAttribute:@"bottom-corner-color"]];
|
||||
if (_scrollerStyle === CPScrollerStyleLegacy)
|
||||
{
|
||||
[[self bottomCornerView] setFrame:[self _bottomCornerViewFrame]];
|
||||
[[self bottomCornerView] setBackgroundColor:[self currentValueForThemeAttribute:@"bottom-corner-color"]];
|
||||
}
|
||||
|
||||
--_recursionCount;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user