瀏覽代碼

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

chenyu 1 年之前
父節點
當前提交
11f9768b74
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      compdfkit-tools/compdfkit-tools/Common/Views/PDFProperties/CPDFThicknessSliderView.m

+ 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];
         }