Skip to content

Commit

Permalink
Remove duplicate definition of magnification properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
CKegel committed Feb 16, 2024
1 parent 0ae4f4c commit c190383
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 48 deletions.
40 changes: 0 additions & 40 deletions AppKit/NSScrollView.m
Original file line number Diff line number Diff line change
Expand Up @@ -663,18 +663,6 @@ - (BOOL) allowsMagnification {
return _allowsMagnification;
};

- (CGFloat) magnification {
return _magnification;
}

- (CGFloat) maxMagnification {
return _maxMagnification;
}

- (CGFloat) minMagnification {
return _minMagnification;
}

- (void) setDocumentView: (NSView *) view {
[_clipView setDocumentView: view];
[self reflectScrolledClipView: _clipView];
Expand Down Expand Up @@ -840,34 +828,6 @@ - (void) setAutohidesScrollers: (BOOL) value {
// FIXME: tile or hide/show scrollers?
}

- (void) setMagnification: (CGFloat) value {
if (value == _magnification)
return;

_magnification = value;

if (_magnification < _minMagnification)
_magnification = _minMagnification;
if (_magnification < _maxMagnification)
_magnification = _maxMagnification;

// TODO: calculate new bounds and call setBounds
}

- (void) setMinMagnification: (CGFloat) value {
_minMagnification = value;

if (_minMagnification > _magnification)
[self setMagnification: value];
}

- (void) setMaxMagnification: (CGFloat) value {
_maxMagnification = value;

if (_maxMagnification < _magnification)
[self setMagnification: value];
}

- (void) allowsMagnification: (BOOL) value {
_allowsMagnification = value;
}
Expand Down
8 changes: 0 additions & 8 deletions AppKit/include/AppKit/NSScrollView.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ APPKIT_EXPORT NSString *const NSScrollViewDidLiveScrollNotification;
CGFloat _verticalPageScroll;
CGFloat _horizontalLineScroll;
CGFloat _horizontalPageScroll;
CGFloat _magnification;
CGFloat _maxMagnification;
CGFloat _minMagnification;
int _borderType;
BOOL _drawsBackground;
BOOL _hasVerticalScroller;
Expand All @@ -54,7 +51,6 @@ APPKIT_EXPORT NSString *const NSScrollViewDidLiveScrollNotification;
BOOL _rulersVisible;
BOOL _scrollsDynamically;
BOOL _autohidesScrollers;
BOOL _allowsMagnification;
NSCursor *_documentCursor;
BOOL _allowsMagnification;
CGFloat _magnification;
Expand Down Expand Up @@ -112,12 +108,8 @@ APPKIT_EXPORT NSString *const NSScrollViewDidLiveScrollNotification;
- (CGFloat) horizontalPageScroll;
- (CGFloat) lineScroll;
- (CGFloat) pageScroll;
- (CGFloat) magnification;
- (CGFloat) maxMagnification;
- (CGFLoat) minMagnification;
- (BOOL) scrollsDynamically;
- (BOOL) autohidesScrollers;
- (BOOL) allowsMagnification;

- (NSCursor *) documentCursor;
- (CGFloat) magnification;
Expand Down

0 comments on commit c190383

Please sign in to comment.