|
@@ -439,7 +439,14 @@ NSNotificationName const KMPDFViewTableAnnotationDidChangeNotification = @"KMPDF
|
|
|
|
|
|
- (void)setCurrentSelection:(CPDFSelection *)currentSelection {
|
|
- (void)setCurrentSelection:(CPDFSelection *)currentSelection {
|
|
if (self.toolMode == CNoteToolMode && self.annotationType == CAnnotationTypeHighlight) {
|
|
if (self.toolMode == CNoteToolMode && self.annotationType == CAnnotationTypeHighlight) {
|
|
- [currentSelection setColor:[[NSUserDefaults standardUserDefaults] colorForKey:CHighlightNoteColorKey]];
|
|
|
|
|
|
+ NSColor *color = [[NSUserDefaults standardUserDefaults] colorForKey:CHighlightNoteColorKey];
|
|
|
|
+ CGFloat red = 0, green = 0, blue = 0, alpha = 0.7;
|
|
|
|
+ [[color colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&red
|
|
|
|
+ green:&green
|
|
|
|
+ blue:&blue
|
|
|
|
+ alpha:nil];
|
|
|
|
+
|
|
|
|
+ [currentSelection setColor:[NSColor colorWithRed:red green:green blue:blue alpha:alpha]/*[[NSUserDefaults standardUserDefaults] colorForKey:CHighlightNoteColorKey]*/];
|
|
}
|
|
}
|
|
if (currentSelection == nil) {
|
|
if (currentSelection == nil) {
|
|
// selection = [[[PDFSelection alloc] initWithDocument:[self document]] autorelease];
|
|
// selection = [[[PDFSelection alloc] initWithDocument:[self document]] autorelease];
|