File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed
Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 1010
1111@interface SCXcodeMinimapScrollView : NSScrollView
1212
13+ - (instancetype )initWithFrame : (CGRect)frame
14+ editorScrollView : (NSScrollView *)scrollView ;
15+
1316@end
Original file line number Diff line number Diff line change 88
99#import " SCXcodeMinimapScrollView.h"
1010
11+ @interface SCXcodeMinimapScrollView ()
12+
13+ @property (nonatomic , strong ) NSScrollView *editorScrollView;
14+
15+ @end
16+
1117@implementation SCXcodeMinimapScrollView
1218
19+ - (instancetype )initWithFrame : (CGRect)frame
20+ editorScrollView : (NSScrollView *)scrollView
21+ {
22+ if (self = [super initWithFrame: frame]) {
23+ _editorScrollView = scrollView;
24+ }
25+
26+ return self;
27+ }
28+
1329- (void )scrollWheel : (NSEvent *)theEvent
1430{
15- // Disable the scroll wheel on top of the minimap
31+ [ self .editorScrollView scrollWheel: theEvent];
1632}
1733
1834@end
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ - (instancetype)initWithEditor:(IDESourceCodeEditor *)editor
116116 [self setWantsLayer: YES ];
117117 [self setAutoresizingMask: NSViewMinXMargin | NSViewMinYMargin | NSViewWidthSizable | NSViewHeightSizable];
118118
119- self.scrollView = [[SCXcodeMinimapScrollView alloc ] initWithFrame: self .bounds];
119+ self.scrollView = [[SCXcodeMinimapScrollView alloc ] initWithFrame: self .bounds editorScrollView: self .editor.scrollView ];
120120 [self .scrollView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
121121 [self .scrollView setDrawsBackground: NO ];
122122 [self .scrollView setMinMagnification: 0 .0f ];
You can’t perform that action at this time.
0 commit comments