Skip to content

Commit

Permalink
Disable custom scroll on 10.13 to prevent a crash
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoNatan committed Dec 7, 2018
1 parent 2074c8e commit 4e6183d
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions DetoxInstruments/DetoxInstruments/Views/DTXScrollView.m
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,19 @@ - (void)awakeFromNib

self.wantsLayer = YES;
self.layerContentsRedrawPolicy = NSViewLayerContentsRedrawOnSetNeedsDisplay;

_requiresCustomHorizontalScrollerManagement = YES;

_horizontalScroller = [DTXScroller new];
_horizontalScroller.enabled = YES;
_horizontalScroller.alphaValue = 0.0;
[_horizontalScroller _setIsHorizontal:YES];
[_horizontalScroller setOverlayScrollerTrackAlpha:0.0];
_horizontalScroller.scrollerStyle = [NSScroller preferredScrollerStyle];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_scrollerStyleDidChange_DTX) name:NSPreferredScrollerStyleDidChangeNotification object:nil];

if(NSProcessInfo.processInfo.operatingSystemVersion.minorVersion >= 14)
{
_requiresCustomHorizontalScrollerManagement = YES;

_horizontalScroller = [DTXScroller new];
_horizontalScroller.enabled = YES;
_horizontalScroller.alphaValue = 0.0;
[_horizontalScroller _setIsHorizontal:YES];
[_horizontalScroller setOverlayScrollerTrackAlpha:0.0];
_horizontalScroller.scrollerStyle = [NSScroller preferredScrollerStyle];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_scrollerStyleDidChange_DTX) name:NSPreferredScrollerStyleDidChangeNotification object:nil];
}

self.horizontalScroller.alphaValue = 0.0;

Expand Down

0 comments on commit 4e6183d

Please sign in to comment.