3
0

2 کامیت‌ها d842d50697 ... ff79181791

نویسنده SHA1 پیام تاریخ
  chenyu ff79181791 Merge branch 'compdfkit_demo_ios' of git.kdan.cc:others/kmpdfkit_demo into compdfkit_demo_ios 1 سال پیش
  chenyu 83ab0bfe73 PDFTools(iOS) -Fixed 17686 【form】添加form后查看属性面板,需要选中对应颜色(留意排查所有form) 1 سال پیش

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

@@ -143,7 +143,12 @@
     self.borderColorView.selectedColor = self.buttonWidget.borderColor;
     self.backGroundColorView.selectedColor = self.buttonWidget.backgroundColor;
     //Text color
-    self.textColorView.selectedColor = self.buttonWidget.fontColor;
+    if(self.buttonWidget.fontColor == nil) {
+        self.textColorView.selectedColor = [UIColor blackColor];
+    }else{
+        self.textColorView.selectedColor = self.buttonWidget.fontColor;
+    }
+
     
     //Text content
     [self analyzeFont:self.buttonWidget.font.fontName];

+ 9 - 3
compdfkit-tools/compdfkit-tools/Form/Controller/CPDFFormCheckBoxViewController.m

@@ -132,10 +132,16 @@
     if(self.buttonWidget.state == 0) {
         self.selectDefaultSwitchView.switcher.on = NO;
     }
+
+    
+    if(self.buttonWidget.fontColor == nil) {
+        self.colorSelectView.selectedColor = [UIColor blackColor];
+        self.buttonWidget.fontColor = [UIColor blackColor];
+        [self refreshUI];
+    }else{
+        self.colorSelectView.selectedColor = self.buttonWidget.fontColor;
+    }
     
-    self.borderColorView.selectedColor = self.buttonWidget.borderColor;
-    self.backGroundColorView.selectedColor = self.buttonWidget.backgroundColor;
-    self.colorSelectView.selectedColor = self.buttonWidget.fontColor;
     
     switch (buttonWidget.widgetCheckStyle) {
         case CPDFWidgetButtonStyleCheck:{

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

@@ -132,10 +132,7 @@
     //border color
     self.borderColorView.selectedColor = self.comboxChoiceWidget.borderColor;
     //back groundColor
-    CGFloat red, green, blue, alpha;
-    [self.comboxChoiceWidget.backgroundColor getRed:&red green:&green blue:&blue alpha:&alpha];
-    self.backGroundColorView.selectedColor = [UIColor colorWithRed:red green:green blue:blue alpha:self.comboxChoiceWidget.backgroundOpacity];
-    
+    self.backGroundColorView.selectedColor = self.comboxChoiceWidget.backgroundColor;
     //Text color
     self.textColorView.selectedColor = self.comboxChoiceWidget.fontColor;
     

+ 17 - 3
compdfkit-tools/compdfkit-tools/Form/Controller/CPDFFormRadioButtonViewController.m

@@ -121,9 +121,23 @@
     
     self.formTextFiledView.contentField.text = self.buttonWidget.fieldName;
     
-    self.borderColorView.selectedColor = self.buttonWidget.borderColor;
-    self.backGroundColorView.selectedColor = self.buttonWidget.backgroundColor;
-    self.colorSelectView.selectedColor = self.buttonWidget.fontColor;
+    if(self.buttonWidget.borderColor == nil){
+        self.borderColorView.selectedColor = [UIColor blackColor];
+        self.buttonWidget.borderColor = self.borderColorView.selectedColor;
+        [self refreshUI];
+    }else{
+        self.borderColorView.selectedColor = self.buttonWidget.borderColor;
+    }
+    
+    
+    if(self.buttonWidget.fontColor == nil) {
+        self.colorSelectView.selectedColor = [UIColor blackColor];
+        self.buttonWidget.fontColor = [UIColor blackColor];
+        [self refreshUI];
+    }else{
+        self.colorSelectView.selectedColor = self.buttonWidget.fontColor;
+    }
+    
     self.hideFormSwitchView.switcher.on = self.buttonWidget.isHidden;
     
     if(self.buttonWidget.state == 1)  {

+ 1 - 0
compdfkit-tools/compdfkit-tools/Form/Controller/CPDFFormTextViewController.m

@@ -160,6 +160,7 @@
     //Text color
     self.textColorView.selectedColor = self.textWidget.fontColor;
     
+    
     //Text content
     [self analyzeFont:self.textWidget.font.fontName];