瀏覽代碼

PDFAnnotation(iOS)-暗黑模式下toolbar的背景颜色修改

yangliuhua 1 年之前
父節點
當前提交
190725aefe

+ 4 - 4
compdfkit-tools/compdfkit-tools/Common/Utils/UtilsColor.xcassets/CAnnotationBarNoSelectBackgroundColor.colorset/Contents.json

@@ -22,10 +22,10 @@
       "color" : {
         "color-space" : "srgb",
         "components" : {
-          "alpha" : "0.500",
-          "blue" : "255",
-          "green" : "153",
-          "red" : "100"
+          "alpha" : "1.000",
+          "blue" : "115",
+          "green" : "103",
+          "red" : "96"
         }
       },
       "idiom" : "universal"

+ 18 - 0
compdfkit-tools/compdfkit-tools/Common/Utils/UtilsColor.xcassets/CAnnotationBarSelectBackgroundColor.colorset/Contents.json

@@ -11,6 +11,24 @@
         }
       },
       "idiom" : "universal"
+    },
+    {
+      "appearances" : [
+        {
+          "appearance" : "luminosity",
+          "value" : "dark"
+        }
+      ],
+      "color" : {
+        "color-space" : "srgb",
+        "components" : {
+          "alpha" : "1.000",
+          "blue" : "255",
+          "green" : "153",
+          "red" : "100"
+        }
+      },
+      "idiom" : "universal"
     }
   ],
   "info" : {

+ 4 - 4
compdfkit-tools/compdfkit-tools/Common/Views/PDFAnnotationBar/CPDFAnnotationBar.m

@@ -76,7 +76,7 @@
     if (self = [super init]) {
         self.annotManage = annotationManage;
         
-        self.backgroundColor = [CPDFColorUtils CPDFViewControllerBackgroundColor];
+        self.backgroundColor = [CPDFColorUtils CAnnotationBarNoSelectBackgroundColor];
         
         UIView *line = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, 1)];
         line.backgroundColor = [UIColor colorWithRed:210.0/255.0 green:210.0/255.0 blue:210.0/255.0 alpha:1.0];
@@ -118,7 +118,7 @@
             for (NSInteger i = 0; i< self.annotationBtns.count; i++) {
                 CPDFAnnotationBarButton *button = [self.annotationBtns objectAtIndex:i];
                 if(button.tag == self.selectedIndex) {
-                    button.backgroundColor = [UIColor clearColor];
+                    button.backgroundColor = [CPDFColorUtils CAnnotationBarNoSelectBackgroundColor];
                     self.selectedIndex = 0;
                     break;
                 }
@@ -131,7 +131,7 @@
                 button.backgroundColor = [CPDFColorUtils CAnnotationBarSelectBackgroundColor];
                 self.selectedIndex = button.tag;
             } else {
-                button.backgroundColor = [UIColor clearColor];
+                button.backgroundColor = [CPDFColorUtils CAnnotationBarNoSelectBackgroundColor];
             }
         }
     }
@@ -338,7 +338,7 @@
         }
         self.pdfListView.annotationMode = CPDFViewAnnotationModeNone;
         self.selectedIndex = 0;
-        button.backgroundColor = [UIColor clearColor];
+        button.backgroundColor = [CPDFColorUtils CAnnotationBarNoSelectBackgroundColor];
         isSelect = NO;
     }
     

+ 1 - 0
compdfkit-tools/compdfkit-tools/PageEdit/Views/CInsertBlankPageCell.m

@@ -236,6 +236,7 @@
     UITextField *tTextField = [[UITextField alloc] initWithFrame:rect];
     
     tTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
+    tTextField.backgroundColor = [CPDFColorUtils CAnnotationBarNoSelectBackgroundColor];
     tTextField.returnKeyType = UIReturnKeyDone;
     tTextField.leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 8, 0)];
     tTextField.leftViewMode = UITextFieldViewModeAlways;

+ 1 - 1
compdfkit-tools/compdfkit-tools/PageEdit/Views/CPageEditToolBar.m

@@ -40,7 +40,7 @@
 
 - (instancetype)initWithFrame:(CGRect)frame {
     if (self = [super initWithFrame:frame]) {
-        self.backgroundColor = [CPDFColorUtils CPDFViewControllerBackgroundColor];
+        self.backgroundColor = [CPDFColorUtils CAnnotationBarNoSelectBackgroundColor];
         
         UIView *line = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, 1)];
         line.backgroundColor = [UIColor colorWithRed:210.0/255.0 green:210.0/255.0 blue:210.0/255.0 alpha:1.0];

+ 1 - 1
compdfkit-tools/compdfkit-tools/PageEdit/Views/Image.xcassets/CInsertBlankPageCellHorizontal.imageset/Contents.json

@@ -11,7 +11,7 @@
           "value" : "dark"
         }
       ],
-      "filename" : "Status=sel 1.pdf",
+      "filename" : "Status=nor.pdf",
       "idiom" : "universal"
     }
   ],

+ 1 - 1
compdfkit-tools/compdfkit-tools/PageEdit/Views/Image.xcassets/CInsertBlankPageCellHorizontal.imageset/Status=sel 1.pdf

@@ -11,7 +11,7 @@ stream
 /DeviceRGB cs
 q
 0.000000 1.000000 1.000000 -0.000000 4.250000 2.750000 cm
-0.391667 0.598991 1.000000 scn
+1.000000 1.000000 1.000000 scn
 0.750000 14.500000 m
 0.000000 14.500000 l
 0.000000 13.750000 l

+ 1 - 1
compdfkit-tools/compdfkit-tools/PageEdit/Views/Image.xcassets/CInsertBlankPageCellVertical.imageset/Contents.json

@@ -11,7 +11,7 @@
           "value" : "dark"
         }
       ],
-      "filename" : "Status=sel 1.pdf",
+      "filename" : "Status=nor.pdf",
       "idiom" : "universal"
     }
   ],

+ 1 - 1
compdfkit-tools/compdfkit-tools/PageEdit/Views/Image.xcassets/CInsertBlankPageCellVertical.imageset/Status=sel 1.pdf

@@ -11,7 +11,7 @@ stream
 /DeviceRGB cs
 q
 1.000000 0.000000 -0.000000 1.000000 2.750000 1.250000 cm
-0.391667 0.598991 1.000000 scn
+1.000000 1.000000 1.000000 scn
 0.750000 17.500000 m
 0.000000 17.500000 l
 0.000000 16.750000 l