Procházet zdrojové kódy

【注释】高亮注释拖拽时透明度不能是100%

liujiajie před 6 měsíci
rodič
revize
027cefe348

+ 8 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.m

@@ -439,7 +439,14 @@ NSNotificationName const KMPDFViewTableAnnotationDidChangeNotification = @"KMPDF
 
 - (void)setCurrentSelection:(CPDFSelection *)currentSelection {
     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) {
 //        selection = [[[PDFSelection alloc] initWithDocument:[self document]] autorelease];