Browse Source

Merge branch 'develop_PDFReaderProNew' of git.kdan.cc:Mac_PDF/PDF_Office into develop_PDFReaderProNew

tangchao 11 months ago
parent
commit
0b9db761d9

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationPropertiesViewController.xib

@@ -36,7 +36,7 @@
                     <subviews>
                         <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Mws-8l-JHx">
                             <rect key="frame" x="14" y="13" width="256" height="15"/>
-                            <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="left" id="mBB-CB-9jR">
+                            <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" id="mBB-CB-9jR">
                                 <font key="font" metaFont="systemBold" size="12"/>
                                 <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
                                 <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>

+ 1 - 2
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/View/KMPopUpButton.swift

@@ -23,8 +23,7 @@ import Cocoa
                 wantsLayer = true
                 layer?.borderWidth = 1.0
                 layer?.cornerRadius = 4.0
-                layer?.borderColor = NSColor(red: 223.0/255.0, green: 225.0/255.0, blue: 229.0/255.0, alpha: 1).cgColor
-                layer?.backgroundColor = NSColor.white.cgColor
+                layer?.borderColor = KMAppearance.Layout.bgColor().cgColor
                 bezelStyle = .shadowlessSquare
             case .noArrow:
                 break

+ 2 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/FormProperties/KMAnnotationButtonWidgetAppearanceViewController.swift

@@ -181,7 +181,8 @@ import Cocoa
                 textColorPickerView.color = fontColor
             }
 
-            fontSizeComboBox.stringValue = "\(annotationFreeText.font.pointSize) pt"
+            fontSizeComboBox.stringValue = String(format: "%.f pt", annotationFreeText.font.pointSize)
+
             DispatchQueue.global(qos: .default).async {
                 let fonts = NSFontManager.shared.availableFontFamilies
                 var selectedIndex = 0

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/FormProperties/KMAnnotationChoiceWidgetAppearanceViewController.swift

@@ -130,7 +130,7 @@ private enum KMPDFAnnotationFontWeightType: Int {
                 fillColorPickerView.color = annotation?.backgroundColor
                 colorPickerView.color = fontColor
             }
-            fontSizeComboBox.stringValue = "\(annotation?.font.pointSize) pt"
+            fontSizeComboBox.stringValue = String(format: "%.f pt", (annotation?.fontSize())!)
         } else {
             if let color = annotationModel.backgroundColor() {
                 color.usingColorSpaceName(NSColorSpaceName.calibratedRGB)?.getRed(nil, green: nil, blue: nil, alpha: &opacity)
@@ -139,7 +139,7 @@ private enum KMPDFAnnotationFontWeightType: Int {
                 fillColorPickerView.color = annotationModel.backgroundColor()
                 colorPickerView.color = fontColor
             }
-            fontSizeComboBox.stringValue = "\(annotationModel.fontSize()) pt"
+            fontSizeComboBox.stringValue = String(format: "%.f pt", annotationModel.fontSize())
         }
 
         DispatchQueue.global(qos: .default).async { [self] in

+ 3 - 3
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/FormProperties/KMAnnotationFromViewController.swift

@@ -186,7 +186,7 @@ import Cocoa
                 fillColorPickerView!.color = color
                 colorPickerView.color = fontColor
                 
-                fontSizeComboBox.stringValue = "\((annotation as! CPDFTextWidgetAnnotation).font.pointSize) pt"
+                fontSizeComboBox.stringValue = String(format: "%.f pt", ((annotation as! CPDFTextWidgetAnnotation).font.pointSize))
                 
                 DispatchQueue.global(qos: .default).async { [self] in
                     let fonts = NSFontManager.shared.availableFontFamilies
@@ -232,8 +232,8 @@ import Cocoa
             let fontColor = annotationModel.fontColor()
             fillColorPickerView!.color = color
             colorPickerView.color = fontColor
-            fontSizeComboBox.stringValue = "\(annotationModel.fontSize() ?? 12.0) pt"
-            
+            fontSizeComboBox.stringValue = String(format: "%.f pt", (annotationModel.fontSize() ?? 12))
+
             var annotationFont = NSFont.systemFont(ofSize: annotationModel.fontSize())
             if annotationModel.fontName() != nil {
                 annotationFont = NSFont(name: (annotationModel.fontName())!, size: (annotationModel.fontSize()))!

+ 4 - 4
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/Signature/KMSignatureAnnotationViewController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -44,7 +44,7 @@
                                     </connections>
                                 </button>
                                 <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2BZ-Qt-bmp">
-                                    <rect key="frame" x="14" y="17" width="62" height="16"/>
+                                    <rect key="frame" x="83" y="17" width="62" height="16"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Signature" id="d1y-xG-Jfy">
                                         <font key="font" usesAppearanceFont="YES"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -54,7 +54,7 @@
                             </subviews>
                             <constraints>
                                 <constraint firstItem="2BZ-Qt-bmp" firstAttribute="centerY" secondItem="LHW-Nt-uf2" secondAttribute="centerY" id="0wM-Ss-TLf"/>
-                                <constraint firstItem="2BZ-Qt-bmp" firstAttribute="leading" secondItem="LHW-Nt-uf2" secondAttribute="leading" constant="16" id="Ujg-9m-Hok"/>
+                                <constraint firstItem="2BZ-Qt-bmp" firstAttribute="centerX" secondItem="LHW-Nt-uf2" secondAttribute="centerX" id="ZSn-w9-kdP"/>
                                 <constraint firstItem="KUF-xf-qzQ" firstAttribute="centerY" secondItem="LHW-Nt-uf2" secondAttribute="centerY" id="g0U-Rq-gCw"/>
                                 <constraint firstAttribute="height" constant="50" id="qyo-8u-igd"/>
                                 <constraint firstAttribute="trailing" secondItem="KUF-xf-qzQ" secondAttribute="trailing" constant="16" id="ryG-zy-qMz"/>