Revision: 24141
http://sourceforge.net/p/bibdesk/svn/24141
Author: hofman
Date: 2019-08-16 14:02:42 +0000 (Fri, 16 Aug 2019)
Log Message:
-----------
only show rating button placeholders in tableview when selected
Modified Paths:
--------------
trunk/bibdesk/BDSKRatingButtonCell.m
Modified: trunk/bibdesk/BDSKRatingButtonCell.m
===================================================================
--- trunk/bibdesk/BDSKRatingButtonCell.m 2019-08-16 13:38:54 UTC (rev
24140)
+++ trunk/bibdesk/BDSKRatingButtonCell.m 2019-08-16 14:02:42 UTC (rev
24141)
@@ -321,7 +321,7 @@
NSRect rect = NSMakeRect(NSMinX(buttonRect) + margin + 0.5f *
(OUTER_SIZE - MARKER_SIZE), NSMinY(buttonRect) + 0.5f * (NSHeight(buttonRect) -
MARKER_SIZE), MARKER_SIZE, MARKER_SIZE);
NSColor *color = nil;
NSColor *borderColor = nil;
- BOOL selected = NO;
+ BOOL showPlaceholders = YES;
NSUInteger i = 0;
[NSGraphicsContext saveGraphicsState];
@@ -337,9 +337,11 @@
[NSBezierPath setDefaultLineWidth:1.0];
[NSBezierPath strokeRect:NSInsetRect(buttonRect, 0.5, 0.5)];
NSRectClip(NSInsetRect(buttonRect, 2.0, 2.0));
+ } else if ([self backgroundStyle] == NSBackgroundStyleDark) {
+ color = [NSColor selectedControlTextColor];
} else {
- color = ([self backgroundStyle] == NSBackgroundStyleDark) ? [NSColor
selectedControlTextColor] : [NSColor systemGrayColor];
- selected = YES;
+ color = [NSColor systemGrayColor];
+ showPlaceholders = NO;
}
[color set];
@@ -349,7 +351,7 @@
rect.origin.x += OUTER_SIZE;
}
- if ((selected || [self isBordered]) && [self isEnabled] && rating <
maxRating) {
+ if (showPlaceholders && [self isEnabled] && rating < maxRating) {
rect.size = NSMakeSize(PLACEHOLDER_SIZE, PLACEHOLDER_SIZE);
rect.origin.x += 0.5f * (MARKER_SIZE - PLACEHOLDER_SIZE);
rect.origin.y += 0.5f * (MARKER_SIZE - PLACEHOLDER_SIZE);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit