2 Commits 83f376f5d6 ... 71f67c5368

Author SHA1 Message Date
  chenyu 71f67c5368 Merge branch 'compdfkit_demo_ios' of git.kdan.cc:others/kmpdfkit_demo into compdfkit_demo_ios 1 year ago
  chenyu 7e257d10e8 ComPDFKit_Tools - Bug Fixed 18164 【Form】添加复选框、单选框,调节边框色和背景色,再次选中属性,边框色和背景色未选中 1 year ago

+ 3 - 2
ComPDFKit_Tools/ComPDFKit_Tools/Common/Views/PDFProperties/CPDFThicknessSliderView.m

@@ -36,7 +36,7 @@
         self.thicknessSlider = [[UISlider alloc] init];
         self.thicknessSlider.autoresizingMask = UIViewAutoresizingFlexibleWidth;
         self.thicknessSlider.maximumValue = 10.0;
-        self.thicknessSlider.minimumValue = 1.0;
+        self.thicknessSlider.minimumValue = 0.1;
         [self.thicknessSlider addTarget:self action:@selector(buttonItemClicked_changes:) forControlEvents:UIControlEventValueChanged];
         [self addSubview:self.thicknessSlider];
         
@@ -65,7 +65,7 @@
 - (void)setDefaultValue:(CGFloat)defaultValue {
     _defaultValue = defaultValue;
     self.thicknessSlider.value = (float) (defaultValue * 10);
-    self.startLabel.text = [NSString stringWithFormat:@"%d pt", (int)defaultValue * 100];
+    self.startLabel.text = [NSString stringWithFormat:@"%d pt", (int)(defaultValue * 100)];
 }
 
 
@@ -80,6 +80,7 @@
 #pragma mark - Action
 
 - (void)buttonItemClicked_changes:(UISlider *)sender {
+    NSLog(@"senderValue %f",sender.value);
     self.sliderCount -- ;
     if(self.sliderCount == 3) {
         self.startLabel.text = [NSString stringWithFormat:@"%.0f pt", sender.value * self.thick];

+ 10 - 0
ComPDFKit_Tools/ComPDFKit_Tools/Forms/PDFFormProperties/Controller/CPDFFormCheckBoxViewController.m

@@ -134,6 +134,16 @@
         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;
+    }
+    
+    self.backGroundColorView.selectedColor = self.buttonWidget.backgroundColor;
+    
     
     switch (buttonWidget.widgetCheckStyle) {
         case CPDFWidgetButtonStyleCheck:{

+ 2 - 0
ComPDFKit_Tools/ComPDFKit_Tools/Forms/PDFFormProperties/Controller/CPDFFormRadioButtonViewController.m

@@ -121,6 +121,8 @@
         self.borderColorView.selectedColor = self.buttonWidget.borderColor;
     }
     
+    self.backGroundColorView.selectedColor = self.buttonWidget.backgroundColor;
+    
     
     if(self.buttonWidget.fontColor == nil) {
         self.colorSelectView.selectedColor = [UIColor blackColor];

+ 1 - 4
ComPDFKit_Tools/ComPDFKit_Tools/Forms/PDFFormProperties/Controller/CPDFFormTextViewController.m

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