Browse Source

PDFTools(iOS)- 表单字体颜色偏色修正

chenyu 1 year ago
parent
commit
860e658404

+ 2 - 0
compdfkit-tools/compdfkit-tools/Common/Utils/CPDFColorUtils.h

@@ -38,6 +38,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 + (UIColor *)CAnnotationBarNoSelectBackgroundColor;
 
++ (UIColor *)CFormFontColor;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 9 - 0
compdfkit-tools/compdfkit-tools/Common/Utils/CPDFColorUtils.m

@@ -102,4 +102,13 @@
     }
 }
 
++ (UIColor *)CFormFontColor {
+    if (@available(iOS 13.0, *)) {
+        return [UIColor colorNamed:@"CFormFontColor" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil];
+    } else {
+        return [UIColor colorWithRed:253.0/255.0 green:254.0/255.0 blue:255.0/255.0 alpha:1.0];
+    }
+}
+
+
 @end

+ 38 - 0
compdfkit-tools/compdfkit-tools/Common/Utils/UtilsColor.xcassets/CFormFontColor.colorset/Contents.json

@@ -0,0 +1,38 @@
+{
+  "colors" : [
+    {
+      "color" : {
+        "color-space" : "srgb",
+        "components" : {
+          "alpha" : "1.000",
+          "blue" : "0.000",
+          "green" : "0.000",
+          "red" : "0.000"
+        }
+      },
+      "idiom" : "universal"
+    },
+    {
+      "appearances" : [
+        {
+          "appearance" : "luminosity",
+          "value" : "dark"
+        }
+      ],
+      "color" : {
+        "color-space" : "srgb",
+        "components" : {
+          "alpha" : "1.000",
+          "blue" : "1.000",
+          "green" : "1.000",
+          "red" : "1.000"
+        }
+      },
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 1 - 1
compdfkit-tools/compdfkit-tools/Common/Views/PDFProperties/CPDFThicknessSliderView.m

@@ -46,7 +46,7 @@
         self.startLabel.textAlignment = NSTextAlignmentCenter;
         self.startLabel.layer.borderColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.1].CGColor;
         self.startLabel.autoresizingMask = UIViewAutoresizingFlexibleRightMargin;
-        self.startLabel.textColor = [CPDFColorUtils CPageEditToolbarFontColor];
+        self.startLabel.textColor = [CPDFColorUtils CFormFontColor];
         [self addSubview:self.startLabel];
         
         self.thick = 1;

+ 1 - 1
compdfkit-tools/compdfkit-tools/Form/Controller/CPDFFormButtonViewController.m

@@ -245,7 +245,7 @@
 
 
 - (void)commomInitTitle {
-    self.titleLabel.text = NSLocalizedString(@"Button", nil);
+    self.titleLabel.text = NSLocalizedString(@"Push Button", nil);
 }
 
 - (void)updatePreferredContentSizeWithTraitCollection:(UITraitCollection *)traitCollection {

+ 1 - 1
compdfkit-tools/compdfkit-tools/Form/Controller/CPDFFormCheckBoxViewController.m

@@ -176,7 +176,7 @@
 }
 
 - (void)commomInitTitle {
-    self.titleLabel.text = NSLocalizedString(@"Check Button", nil);
+    self.titleLabel.text = NSLocalizedString(@"Check Box", nil);
 }
 
 - (void)buttonItemClicked_back:(id)sender {

+ 1 - 1
compdfkit-tools/compdfkit-tools/Form/Controller/CPDFFormComboxViewController.m

@@ -232,7 +232,7 @@
 }
 
 - (void)commomInitTitle {
-    self.titleLabel.text = NSLocalizedString(@"ComBox", nil);
+    self.titleLabel.text = NSLocalizedString(@"Combo Box", nil);
 }
 
 - (void)updatePreferredContentSizeWithTraitCollection:(UITraitCollection *)traitCollection {

+ 2 - 2
compdfkit-tools/compdfkit-tools/Form/Controller/CPDFFormTextViewController.m

@@ -67,7 +67,7 @@
     // Do any additional setup after loading the view.
     self.borderColorView = [[CPDFColorSelectView alloc] init];
     self.borderColorView.delegate = self;
-    self.borderColorView.colorLabel.text = NSLocalizedString(@"Border Color", nil);
+    self.borderColorView.colorLabel.text = NSLocalizedString(@"Stroke Color", nil);
     self.borderColorView.colorLabel.font = [UIFont boldSystemFontOfSize:13.0];
     self.borderColorView.colorLabel.textColor = [UIColor colorWithRed:153/255. green:153/255. blue:153/255. alpha:1];
     self.borderColorView.colorPickerView.showsHorizontalScrollIndicator = NO;
@@ -80,7 +80,7 @@
     self.backGroundColorView.colorPickerView.showsHorizontalScrollIndicator = NO;
     
     self.textColorView = [[CPDFColorSelectView alloc] init];
-    self.textColorView.colorLabel.text = NSLocalizedString(@"Text Color", nil);
+    self.textColorView.colorLabel.text = NSLocalizedString(@"Font Color", nil);
     self.textColorView.colorLabel.font = [UIFont boldSystemFontOfSize:13.0];
     self.textColorView.delegate = self;
     self.textColorView.colorLabel.textColor = [UIColor colorWithRed:153/255. green:153/255. blue:153/255. alpha:1];

+ 1 - 1
compdfkit-tools/compdfkit-tools/Form/View/CPDFFontSettingView.m

@@ -60,7 +60,7 @@
         self.fontNameSelectLabel.adjustsFontSizeToFitWidth = YES;
         self.fontNameSelectLabel.textColor = [UIColor blackColor];
         [self.dropMenuView addSubview:self.fontNameSelectLabel];
-        self.fontNameSelectLabel.textColor = [CPDFColorUtils CPageEditToolbarFontColor];
+        self.fontNameSelectLabel.textColor = [CPDFColorUtils CFormFontColor];
         
         self.fontSelectBtn = [UIButton buttonWithType:UIButtonTypeCustom];
         self.fontSelectBtn.backgroundColor = [UIColor clearColor];

+ 1 - 1
compdfkit-tools/compdfkit-tools/Form/View/CPDFFormTextFieldView.m

@@ -20,7 +20,7 @@
 - (instancetype)initWithFrame:(CGRect)frame {
     if (self = [super initWithFrame:frame]) {
         self.titleLabel = [[UILabel alloc] init];
-        self.titleLabel.text = NSLocalizedString(@"Field Name", nil);
+        self.titleLabel.text = NSLocalizedString(@"Name", nil);
         self.titleLabel.textColor = [UIColor colorWithRed:153/255. green:153/255. blue:153/255. alpha:1.];
         self.titleLabel.font = [UIFont boldSystemFontOfSize:13.0];
         [self addSubview:self.titleLabel];