Revision: 28662 http://sourceforge.net/p/bibdesk/svn/28662 Author: hofman Date: 2024-01-24 09:53:41 +0000 (Wed, 24 Jan 2024) Log Message: ----------- use the tag for the arrow direction
Modified Paths: -------------- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVArrowButton.h trunk/bibdesk_vendorsrc/amaxwell/FileView/FVArrowButton.m trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVArrowButton.h =================================================================== --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVArrowButton.h 2024-01-23 22:50:35 UTC (rev 28661) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVArrowButton.h 2024-01-24 09:53:41 UTC (rev 28662) @@ -40,7 +40,7 @@ /** @file FVArrowButton.h Arrow button for page changes. */ -typedef NS_ENUM(NSUInteger, FVArrowDirection) { +typedef NS_ENUM(NSInteger, FVArrowDirection) { FVArrowRight = 0, FVArrowLeft = 1 }; @@ -52,11 +52,6 @@ /** The arrow direction. - Cover method for the cell's property. Calls setNeedsDisplay:. */ -@property (nonatomic) FVArrowDirection arrowDirection; - -/** The arrow direction. - Cover method for the cell's property. This is animatable. Calls setNeedsDisplay:. */ @property (nonatomic) CGFloat arrowAlpha; @@ -70,11 +65,6 @@ CGFloat _arrowAlpha; } -/** The arrow direction. - - Determines which way the arrow points. */ -@property (nonatomic) FVArrowDirection arrowDirection; - /** The arrow alpha. Determines an overall alpha when drawing. */ @@ -82,7 +72,7 @@ @end -/** @typedef NSUInteger FVArrowDirection +/** @typedef NSInteger FVArrowDirection FVArrowButtonCell direction. */ Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVArrowButton.m =================================================================== --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVArrowButton.m 2024-01-23 22:50:35 UTC (rev 28661) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVArrowButton.m 2024-01-24 09:53:41 UTC (rev 28662) @@ -47,7 +47,7 @@ @implementation FVArrowButton -@dynamic arrowDirection, arrowAlpha; +@dynamic arrowAlpha; + (id)defaultAnimationForKey:(NSAnimatablePropertyKey)key { if ([key isEqualToString:@"arrowAlpha"]) @@ -57,14 +57,6 @@ + (Class)cellClass { return [FVArrowButtonCell self]; } -- (FVArrowDirection)arrowDirection { - return [(FVArrowButtonCell *)[self cell] arrowDirection]; -} - -- (void)setArrowDirection:(FVArrowDirection)arrowDirection { - [(FVArrowButtonCell *)[self cell] setArrowDirection:arrowDirection]; -} - - (CGFloat)arrowAlpha { return [(FVArrowButtonCell *)[self cell] arrowAlpha]; } @@ -78,7 +70,6 @@ @implementation FVArrowButtonCell -@synthesize arrowDirection=_arrowDirection; @synthesize arrowAlpha=_arrowAlpha; - (id)initTextCell:(NSString *)string { @@ -89,7 +80,6 @@ [self setBezelStyle:NSRegularSquareBezelStyle]; [self setBordered:NO]; [self setContinuous:YES]; - _arrowDirection = FVArrowRight; _arrowAlpha = 1.0; } return self; @@ -103,7 +93,6 @@ [self setBezelStyle:NSRegularSquareBezelStyle]; [self setBordered:NO]; [self setContinuous:YES]; - _arrowDirection = FVArrowRight; _arrowAlpha = 1.0; } return self; @@ -112,8 +101,8 @@ - (NSBezierPath *)arrowBezierPathWithSize:(NSSize)size; { CGFloat w = size.width / 16.0, h = size.height / 16.0; - CGFloat tip = _arrowDirection == FVArrowRight ? 14.0*w : 2.0*w; - CGFloat base = _arrowDirection == FVArrowRight ? 3.0*w : 13.0*w; + CGFloat tip = [self tag] == FVArrowRight ? 14.0*w : 2.0*w; + CGFloat base = [self tag] == FVArrowRight ? 3.0*w : 13.0*w; NSBezierPath *arrow = [NSBezierPath bezierPath]; [arrow moveToPoint:NSMakePoint(base, 6.0*h)]; Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m =================================================================== --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2024-01-23 22:50:35 UTC (rev 28661) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2024-01-24 09:53:41 UTC (rev 28662) @@ -388,12 +388,12 @@ [_subtitleCell setAlignment:NSTextAlignmentCenter]; _leftArrow = [[FVArrowButton alloc] init]; - [_leftArrow setArrowDirection:FVArrowLeft]; + [_leftArrow setTag:FVArrowLeft]; [_leftArrow setTarget:self]; [_leftArrow setAction:@selector(leftArrowAction:)]; _rightArrow = [[FVArrowButton alloc] init]; - [_rightArrow setArrowDirection:FVArrowRight]; + [_rightArrow setTag:FVArrowRight]; [_rightArrow setTarget:self]; [_rightArrow setAction:@selector(rightArrowAction:)]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit