2 Commits d842d50697 ... ff79181791

Auteur SHA1 Message Date
  chenyu ff79181791 Merge branch 'compdfkit_demo_ios' of git.kdan.cc:others/kmpdfkit_demo into compdfkit_demo_ios il y a 1 an
  chenyu 83ab0bfe73 PDFTools(iOS) -Fixed 17686 【form】添加form后查看属性面板,需要选中对应颜色(留意排查所有form) il y a 1 an

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

@@ -143,7 +143,12 @@
     self.borderColorView.selectedColor = self.buttonWidget.borderColor;
     self.borderColorView.selectedColor = self.buttonWidget.borderColor;
     self.backGroundColorView.selectedColor = self.buttonWidget.backgroundColor;
     self.backGroundColorView.selectedColor = self.buttonWidget.backgroundColor;
     //Text color
     //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
     //Text content
     [self analyzeFont:self.buttonWidget.font.fontName];
     [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) {
     if(self.buttonWidget.state == 0) {
         self.selectDefaultSwitchView.switcher.on = NO;
         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) {
     switch (buttonWidget.widgetCheckStyle) {
         case CPDFWidgetButtonStyleCheck:{
         case CPDFWidgetButtonStyleCheck:{

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

@@ -132,10 +132,7 @@
     //border color
     //border color
     self.borderColorView.selectedColor = self.comboxChoiceWidget.borderColor;
     self.borderColorView.selectedColor = self.comboxChoiceWidget.borderColor;
     //back groundColor
     //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
     //Text color
     self.textColorView.selectedColor = self.comboxChoiceWidget.fontColor;
     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.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;
     self.hideFormSwitchView.switcher.on = self.buttonWidget.isHidden;
     
     
     if(self.buttonWidget.state == 1)  {
     if(self.buttonWidget.state == 1)  {

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

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