Quellcode durchsuchen

PDFTools(iOS) - fixed 17868 【form】字体大小目前为小数(参考安卓,保留到整数)

chenyu vor 1 Jahr
Ursprung
Commit
11f9768b74

+ 3 - 4
compdfkit-tools/compdfkit-tools/Common/Views/PDFProperties/CPDFThicknessSliderView.m

@@ -64,9 +64,8 @@
 
 - (void)setDefaultValue:(CGFloat)defaultValue {
     _defaultValue = defaultValue;
-    self.thicknessSlider.value = defaultValue*10;
-    
-    self.startLabel.text = [NSString stringWithFormat:@"%.1fpt", defaultValue * 100];
+    self.thicknessSlider.value = (float) (defaultValue * 10);
+    self.startLabel.text = [NSString stringWithFormat:@"%.0f pt", defaultValue * 100];
 }
 
 
@@ -83,7 +82,7 @@
 - (void)buttonItemClicked_changes:(UISlider *)sender {
     self.sliderCount -- ;
     if(self.sliderCount == 3) {
-        self.startLabel.text = [NSString stringWithFormat:@"%.1fpt", sender.value * self.thick];
+        self.startLabel.text = [NSString stringWithFormat:@"%.0f pt", sender.value * self.thick];
         if (self.delegate && [self.delegate respondsToSelector:@selector(thicknessSliderView:thickness:)]) {
             [self.delegate thicknessSliderView:self thickness:sender.value];
         }