Ver código fonte

【2025】【综合】偏好设置串接自动滚动

niehaoyu 2 meses atrás
pai
commit
9cc3878950

+ 8 - 8
PDF Office/PDF Master/Class/PDFTools/AutoFlow/KMAotuFlowExtension.swift

@@ -30,16 +30,16 @@ extension CPDFView {
     }
 
     func startAutoFlow() {
-        let timeInterval = KMAutoFlowOptionsSheetController.timeInterval()
+        let timeInterval = SettingsManager.sharedInstance.autoScrollTimeInterval
         let timer = Timer.scheduledTimer(timeInterval: TimeInterval(timeInterval), target: self, selector: #selector(updateAutoFlow), userInfo: nil, repeats: true)
         autoFlowTimer = timer
 
-        CustomAlertView.alertView(message: NSLocalizedString("AutoScroll On", comment: ""), fromView: self, withStyle: .black)
+        let _ = CustomAlertView.alertView(message: NSLocalizedString("AutoScroll On", comment: ""), fromView: self, withStyle: .black)
     }
 
     @objc func updateAutoFlow() {
-        self.setDisplay(.singlePage)
-        let jumpSpace = KMAutoFlowOptionsSheetController.jumpSpace()
+        
+        let jumpSpace = SettingsManager.sharedInstance.autoScrollJumpSpace
         if self.displayMode() == .singlePage ||
             self.displayMode() == .twoUp {
             if canGoToNextPage() {
@@ -60,14 +60,14 @@ extension CPDFView {
             }
         }
     }
-
+    
     func stopAutoFlow() {
         autoFlowTimer?.invalidate()
         autoFlowTimer = nil
-
-        CustomAlertView.alertView(message: NSLocalizedString("AutoScroll Off", comment: ""), fromView: self, withStyle: .black)
+        
+        let _ = CustomAlertView.alertView(message: NSLocalizedString("AutoScroll Off", comment: ""), fromView: self, withStyle: .black)
     }
-
+    
     func isAutoFlow() -> Bool {
         return autoFlowTimer != nil && autoFlowTimer!.isValid
     }

+ 0 - 113
PDF Office/PDF Master/Class/PDFTools/AutoFlow/KMAutoFlowOptionsSheetController.swift

@@ -1,113 +0,0 @@
-//
-//  KMAutoFlowOptionsSheetController.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2024/1/16.
-//
-
-import Cocoa
-
-class KMAutoFlowOptionsSheetController: NSWindowController {
-    @IBOutlet weak var timeIntervalLabel: NSTextField!
-    @IBOutlet weak var timeIntervalSlider: NSSlider!
-    @IBOutlet weak var timeIntervalTextField: NSTextField!
-    @IBOutlet weak var secLabel: NSTextField!
-    @IBOutlet weak var jumpSpaceLabel: NSTextField!
-    @IBOutlet weak var jumpSpaceSlider: NSSlider!
-    @IBOutlet weak var jumpSpaceTextField: NSTextField!
-    @IBOutlet weak var pxLabel: NSTextField!
-    
-    @IBOutlet weak var closeButton: NSButton!
-    @IBOutlet weak var okButton: NSButton!
-    
-    var timeInterval: String?
-    var jumpSpace: String?
-    
-    override init(window: NSWindow?) {
-        super.init(window: window)
-    }
-    
-    required init?(coder: NSCoder) {
-        super.init(coder: coder)
-    }
-    
-    override func windowDidLoad() {
-        super.windowDidLoad()
-        
-        self.closeButton.title = NSLocalizedString("Cancel", comment: "")
-        self.okButton.title = NSLocalizedString("OK", comment: "")
-        self.timeIntervalLabel.stringValue = NSLocalizedString("Time Interval", comment: "")
-        self.jumpSpaceLabel.stringValue = NSLocalizedString("Jump Space", comment: "")
-        self.secLabel.stringValue = NSLocalizedString("sec", comment: "")
-        self.pxLabel.stringValue = NSLocalizedString("px", comment: "")
-        
-        self.timeIntervalTextField.delegate = self
-        self.jumpSpaceTextField.delegate = self
-        
-        let timeInterval = KMAutoFlowOptionsSheetController.timeInterval()
-        let jumpSpace = KMAutoFlowOptionsSheetController.jumpSpace()
-        self.timeInterval = String(timeInterval)
-        self.jumpSpace = String(jumpSpace)
-    }
-    
-    @IBAction func closeButtonAction(_ sender: Any) {
-        self.close()
-    }
-    
-    @IBAction func okButtonAction(_ sender: Any) {
-        let sec = self.timeIntervalTextField.stringValue.isEmpty ? "0" : self.timeIntervalTextField.stringValue
-        var jumpSpaceStr = self.jumpSpaceTextField.stringValue.isEmpty ? "0" : self.jumpSpaceTextField.stringValue
-        //替换”,“
-        jumpSpaceStr = jumpSpaceStr.replacingOccurrences(of: ",", with: "")
-        
-        KMAutoFlowOptionsSheetController.setTimeInterval(Float(sec) ?? 0.0)
-        KMAutoFlowOptionsSheetController.setJumpSpace(Float(jumpSpaceStr) ?? 0.0)
-        
-        self.close()
-    }
-    @IBAction func timeIntervalSliderAction(_ sender: NSSlider) {
-        self.timeIntervalTextField.stringValue = sender.stringValue
-    }
-    
-    @IBAction func jumpSpaceSliderAction(_ sender: NSSlider) {
-        self.jumpSpaceTextField.stringValue = sender.stringValue
-    }
-    
-    
-    class func timeInterval() -> Float {
-        if let storedValue = UserDefaults.standard.object(forKey: "km_pdfview_autoflow_timeinterval") as? Float {
-            return storedValue
-        }
-        return 5.0
-    }
-    
-    class func setTimeInterval(_ timeInterval: Float) {
-        UserDefaults.standard.set(timeInterval, forKey: "km_pdfview_autoflow_timeinterval")
-        UserDefaults.standard.synchronize()
-    }
-    
-    class func jumpSpace() -> Float {
-        if let storedValue = UserDefaults.standard.object(forKey: "km_pdfview_autoflow_jumpspace") as? Float {
-            return storedValue
-        }
-        return 40.0
-    }
-    
-    class func setJumpSpace(_ jumpSpace: Float) {
-        UserDefaults.standard.set(jumpSpace, forKey: "km_pdfview_autoflow_jumpspace")
-        UserDefaults.standard.synchronize()
-    }
-}
-
-extension KMAutoFlowOptionsSheetController: NSTextFieldDelegate {
-    func controlTextDidEndEditing(_ obj: Notification) {
-        let textField: NSTextField = obj.object as! NSTextField;
-        if textField == self.timeIntervalTextField {
-            self.timeIntervalSlider.stringValue = self.timeIntervalTextField.stringValue
-            print("参数改变了")
-        } else if textField == self.jumpSpaceTextField {
-            print("参数改变了2")
-            self.jumpSpaceSlider.stringValue = self.jumpSpaceTextField.stringValue
-        }
-    }
-}

+ 0 - 233
PDF Office/PDF Master/Class/PDFTools/AutoFlow/KMAutoFlowOptionsSheetController.xib

@@ -1,233 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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="22505"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMAutoFlowOptionsSheetController" customModule="PDF_Reader_Pro" customModuleProvider="target">
-            <connections>
-                <outlet property="closeButton" destination="s1O-Cd-eCg" id="2C4-z9-4ge"/>
-                <outlet property="jumpSpaceLabel" destination="BGZ-NV-7Bh" id="f2h-td-NQk"/>
-                <outlet property="jumpSpaceSlider" destination="0Ff-dQ-u9k" id="co2-iX-tkz"/>
-                <outlet property="jumpSpaceTextField" destination="SpP-4y-O15" id="qen-pV-9AS"/>
-                <outlet property="okButton" destination="t7J-DK-BGc" id="K7z-Qg-PFO"/>
-                <outlet property="pxLabel" destination="faS-jX-7gc" id="LGl-no-lqQ"/>
-                <outlet property="secLabel" destination="bsL-ML-8TW" id="aMX-DO-45d"/>
-                <outlet property="timeIntervalLabel" destination="ZTj-Z4-wyT" id="E3m-pQ-g35"/>
-                <outlet property="timeIntervalSlider" destination="q9b-Da-zbl" id="lOx-ZG-5Ml"/>
-                <outlet property="timeIntervalTextField" destination="Ljy-jv-DxZ" id="6lW-V7-tMv"/>
-                <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
-            <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
-            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="196" y="240" width="296" height="235"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
-            <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="296" height="235"/>
-                <autoresizingMask key="autoresizingMask"/>
-                <subviews>
-                    <view wantsLayer="YES" translatesAutoresizingMaskIntoConstraints="NO" id="iww-P7-9I4">
-                        <rect key="frame" x="0.0" y="0.0" width="296" height="235"/>
-                        <subviews>
-                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZTj-Z4-wyT">
-                                <rect key="frame" x="28" y="199" width="83" height="16"/>
-                                <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Time Interval" id="fgk-GN-2ma">
-                                    <font key="font" metaFont="system"/>
-                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                    <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                                </textFieldCell>
-                            </textField>
-                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BGZ-NV-7Bh">
-                                <rect key="frame" x="28" y="118" width="79" height="16"/>
-                                <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Jump Space" id="Yzb-NY-UoI">
-                                    <font key="font" metaFont="system"/>
-                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                    <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                                </textFieldCell>
-                            </textField>
-                            <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="t7J-DK-BGc">
-                                <rect key="frame" x="187" y="13" width="96" height="32"/>
-                                <buttonCell key="cell" type="push" title="OK" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="cBI-Qg-Mn4">
-                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                    <font key="font" metaFont="system"/>
-                                    <string key="keyEquivalent" base64-UTF8="YES">
-DQ
-</string>
-                                </buttonCell>
-                                <constraints>
-                                    <constraint firstAttribute="width" constant="82" id="MJK-HE-g4o"/>
-                                </constraints>
-                                <connections>
-                                    <action selector="okButtonAction:" target="-2" id="f8G-4o-5cA"/>
-                                </connections>
-                            </button>
-                            <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="s1O-Cd-eCg">
-                                <rect key="frame" x="85" y="13" width="96" height="32"/>
-                                <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Ci4-jz-FBT">
-                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                    <font key="font" metaFont="system"/>
-                                    <string key="keyEquivalent" base64-UTF8="YES">
-Gw
-</string>
-                                </buttonCell>
-                                <constraints>
-                                    <constraint firstAttribute="width" constant="82" id="9Od-Aa-mut"/>
-                                </constraints>
-                                <connections>
-                                    <action selector="closeButtonAction:" target="-2" id="xy0-QC-CQf"/>
-                                </connections>
-                            </button>
-                            <slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="q9b-Da-zbl">
-                                <rect key="frame" x="28" y="158" width="154" height="28"/>
-                                <constraints>
-                                    <constraint firstAttribute="width" constant="150" id="q80-Mu-LDU"/>
-                                </constraints>
-                                <sliderCell key="cell" continuous="YES" state="on" alignment="left" minValue="1" maxValue="100" doubleValue="5" tickMarkPosition="below" numberOfTickMarks="5" sliderType="linear" id="CeB-dF-tZc"/>
-                                <connections>
-                                    <action selector="timeIntervalSliderAction:" target="-2" id="D9h-gr-3S9"/>
-                                </connections>
-                            </slider>
-                            <slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0Ff-dQ-u9k">
-                                <rect key="frame" x="28" y="77" width="154" height="28"/>
-                                <constraints>
-                                    <constraint firstAttribute="width" constant="150" id="gZ1-J1-Ymn"/>
-                                </constraints>
-                                <sliderCell key="cell" continuous="YES" state="on" alignment="left" minValue="10" maxValue="1000" doubleValue="20" tickMarkPosition="below" numberOfTickMarks="5" sliderType="linear" id="cRs-cv-InS"/>
-                                <connections>
-                                    <action selector="jumpSpaceSliderAction:" target="-2" id="MED-TW-Or6"/>
-                                </connections>
-                            </slider>
-                            <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ljy-jv-DxZ">
-                                <rect key="frame" x="190" y="163" width="60" height="22"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" constant="22" id="cYp-gZ-5xD"/>
-                                    <constraint firstAttribute="width" constant="60" id="kpB-ps-0sB"/>
-                                </constraints>
-                                <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="center" title="5" drawsBackground="YES" id="sMy-0h-gPe">
-                                    <numberFormatter key="formatter" formatterBehavior="custom10_4" positiveFormat="#,##0" numberStyle="decimal" minimumIntegerDigits="1" maximumIntegerDigits="2000000000" id="oDK-Pi-YME">
-                                        <real key="minimum" value="1"/>
-                                        <real key="maximum" value="100"/>
-                                    </numberFormatter>
-                                    <font key="font" metaFont="system"/>
-                                    <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                    <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                </textFieldCell>
-                            </textField>
-                            <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="SpP-4y-O15">
-                                <rect key="frame" x="190" y="82" width="60" height="22"/>
-                                <constraints>
-                                    <constraint firstAttribute="width" constant="60" id="JlW-EP-Edi"/>
-                                    <constraint firstAttribute="height" constant="22" id="TsY-SP-z4G"/>
-                                </constraints>
-                                <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="center" title="20" drawsBackground="YES" id="t5U-Er-SkE">
-                                    <numberFormatter key="formatter" formatterBehavior="custom10_4" positiveFormat="#,##0" numberStyle="decimal" minimumIntegerDigits="1" maximumIntegerDigits="2000000000" id="q2a-zO-0NW">
-                                        <real key="minimum" value="10"/>
-                                        <real key="maximum" value="1000"/>
-                                    </numberFormatter>
-                                    <font key="font" metaFont="system"/>
-                                    <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                    <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                </textFieldCell>
-                            </textField>
-                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bsL-ML-8TW">
-                                <rect key="frame" x="252" y="166" width="26" height="16"/>
-                                <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="sec" id="LRS-ss-z06">
-                                    <font key="font" metaFont="system"/>
-                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                    <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                                </textFieldCell>
-                            </textField>
-                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="faS-jX-7gc">
-                                <rect key="frame" x="252" y="85" width="19" height="16"/>
-                                <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="px" id="qjn-si-P37">
-                                    <font key="font" metaFont="system"/>
-                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                    <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                                </textFieldCell>
-                            </textField>
-                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZeY-Qw-sjb">
-                                <rect key="frame" x="28" y="150" width="10" height="14"/>
-                                <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="1" id="a6y-aZ-lDi">
-                                    <font key="font" metaFont="smallSystem"/>
-                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                    <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                                </textFieldCell>
-                            </textField>
-                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aNf-cL-SfA">
-                                <rect key="frame" x="158" y="150" width="24" height="14"/>
-                                <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="100" id="bU9-jb-ZfS">
-                                    <font key="font" metaFont="smallSystem"/>
-                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                    <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                                </textFieldCell>
-                            </textField>
-                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="DFB-ri-xLo">
-                                <rect key="frame" x="28" y="69" width="17" height="14"/>
-                                <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="10" id="ioz-Vc-g7V">
-                                    <font key="font" metaFont="smallSystem"/>
-                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                    <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                                </textFieldCell>
-                            </textField>
-                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Pl1-K2-RSE">
-                                <rect key="frame" x="151" y="69" width="31" height="14"/>
-                                <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="1000" id="W6k-3X-Zne">
-                                    <font key="font" metaFont="smallSystem"/>
-                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                    <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                                </textFieldCell>
-                            </textField>
-                        </subviews>
-                        <constraints>
-                            <constraint firstItem="q9b-Da-zbl" firstAttribute="top" secondItem="ZTj-Z4-wyT" secondAttribute="bottom" constant="15" id="1zd-wg-4Zl"/>
-                            <constraint firstAttribute="trailing" secondItem="t7J-DK-BGc" secondAttribute="trailing" constant="20" id="4Zd-Xh-3R6"/>
-                            <constraint firstItem="aNf-cL-SfA" firstAttribute="trailing" secondItem="q9b-Da-zbl" secondAttribute="trailing" id="5qJ-n2-F8K"/>
-                            <constraint firstItem="ZeY-Qw-sjb" firstAttribute="top" secondItem="q9b-Da-zbl" secondAttribute="bottom" id="6Ab-eX-brR"/>
-                            <constraint firstItem="BGZ-NV-7Bh" firstAttribute="leading" secondItem="ZTj-Z4-wyT" secondAttribute="leading" id="74v-1j-0VX"/>
-                            <constraint firstItem="DFB-ri-xLo" firstAttribute="leading" secondItem="0Ff-dQ-u9k" secondAttribute="leading" id="7dM-wY-HNa"/>
-                            <constraint firstItem="Ljy-jv-DxZ" firstAttribute="leading" secondItem="q9b-Da-zbl" secondAttribute="trailing" constant="10" id="AEr-NC-Qut"/>
-                            <constraint firstAttribute="bottom" secondItem="t7J-DK-BGc" secondAttribute="bottom" constant="20" id="CHt-Hv-Jxq"/>
-                            <constraint firstItem="SpP-4y-O15" firstAttribute="centerY" secondItem="0Ff-dQ-u9k" secondAttribute="centerY" id="CbW-Db-hgD"/>
-                            <constraint firstItem="Ljy-jv-DxZ" firstAttribute="centerY" secondItem="q9b-Da-zbl" secondAttribute="centerY" id="G53-jg-6yM"/>
-                            <constraint firstItem="aNf-cL-SfA" firstAttribute="top" secondItem="q9b-Da-zbl" secondAttribute="bottom" id="LKt-XV-CM7"/>
-                            <constraint firstAttribute="bottom" secondItem="s1O-Cd-eCg" secondAttribute="bottom" constant="20" id="OZA-aO-8yk"/>
-                            <constraint firstItem="SpP-4y-O15" firstAttribute="leading" secondItem="0Ff-dQ-u9k" secondAttribute="trailing" constant="10" id="Soz-f2-xFN"/>
-                            <constraint firstItem="Pl1-K2-RSE" firstAttribute="top" secondItem="0Ff-dQ-u9k" secondAttribute="bottom" id="Trk-9M-eLR"/>
-                            <constraint firstItem="ZTj-Z4-wyT" firstAttribute="top" secondItem="iww-P7-9I4" secondAttribute="top" constant="20" id="Xbf-gp-yao"/>
-                            <constraint firstItem="q9b-Da-zbl" firstAttribute="leading" secondItem="ZTj-Z4-wyT" secondAttribute="leading" id="bGp-uE-uyb"/>
-                            <constraint firstItem="faS-jX-7gc" firstAttribute="leading" secondItem="SpP-4y-O15" secondAttribute="trailing" constant="4" id="eeI-7k-blX"/>
-                            <constraint firstItem="bsL-ML-8TW" firstAttribute="centerY" secondItem="Ljy-jv-DxZ" secondAttribute="centerY" id="gao-fH-bBh"/>
-                            <constraint firstItem="Pl1-K2-RSE" firstAttribute="trailing" secondItem="0Ff-dQ-u9k" secondAttribute="trailing" id="iDD-Pj-Jlu"/>
-                            <constraint firstItem="0Ff-dQ-u9k" firstAttribute="top" secondItem="BGZ-NV-7Bh" secondAttribute="bottom" constant="15" id="iLu-r5-JFP"/>
-                            <constraint firstItem="t7J-DK-BGc" firstAttribute="leading" secondItem="s1O-Cd-eCg" secondAttribute="trailing" constant="20" id="js6-II-lzY"/>
-                            <constraint firstItem="0Ff-dQ-u9k" firstAttribute="leading" secondItem="BGZ-NV-7Bh" secondAttribute="leading" id="lwF-q9-Ksn"/>
-                            <constraint firstItem="bsL-ML-8TW" firstAttribute="leading" secondItem="Ljy-jv-DxZ" secondAttribute="trailing" constant="4" id="nbA-o3-Tzl"/>
-                            <constraint firstItem="DFB-ri-xLo" firstAttribute="top" secondItem="0Ff-dQ-u9k" secondAttribute="bottom" id="ojF-p5-JZH"/>
-                            <constraint firstItem="ZTj-Z4-wyT" firstAttribute="leading" secondItem="iww-P7-9I4" secondAttribute="leading" constant="30" id="v18-T9-1n4"/>
-                            <constraint firstItem="faS-jX-7gc" firstAttribute="centerY" secondItem="SpP-4y-O15" secondAttribute="centerY" id="wA2-t2-gqD"/>
-                            <constraint firstItem="BGZ-NV-7Bh" firstAttribute="top" secondItem="q9b-Da-zbl" secondAttribute="bottom" constant="30" id="xqw-uV-Syq"/>
-                            <constraint firstItem="ZeY-Qw-sjb" firstAttribute="leading" secondItem="q9b-Da-zbl" secondAttribute="leading" id="yYt-Xh-Vir"/>
-                        </constraints>
-                    </view>
-                </subviews>
-                <constraints>
-                    <constraint firstAttribute="trailing" secondItem="iww-P7-9I4" secondAttribute="trailing" id="8hN-kR-6qj"/>
-                    <constraint firstAttribute="bottom" secondItem="iww-P7-9I4" secondAttribute="bottom" id="Evb-c0-rAc"/>
-                    <constraint firstItem="iww-P7-9I4" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="GNK-ck-c7W"/>
-                    <constraint firstItem="iww-P7-9I4" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="apa-fO-HMx"/>
-                </constraints>
-            </view>
-            <connections>
-                <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
-            </connections>
-            <point key="canvasLocation" x="47" y="86.5"/>
-        </window>
-        <userDefaultsController representsSharedInstance="YES" id="sBo-hf-3Wk"/>
-    </objects>
-</document>

+ 0 - 3
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -109,9 +109,6 @@ struct KMNMWCFlags {
     
     var model = KMMainModel()
     
-    //自动滚动
-    var autoFlowOptionsSheetController: KMAutoFlowOptionsSheetController?
-    
     //Search
     var searchIndex: Int = 0
      

+ 122 - 20
PDF Office/PDF Master/KMClass/Settings/SettingsDisplayView.swift

@@ -45,6 +45,18 @@ class SettingsDisplayView: BaseXibView {
     @IBOutlet weak var highlightLinkBoxWidthConst: NSLayoutConstraint!
     @IBOutlet weak var highglightFormboxWidthConst: NSLayoutConstraint!
     
+    @IBOutlet var autoScrollView: NSView!
+    @IBOutlet var autoScrolllabel: NSTextField!
+    @IBOutlet var timeLabel: NSTextField!
+    @IBOutlet var autoTimeSlider: ComponentSlider!
+    @IBOutlet var autoTimeSelect: ComponentSelect!
+    @IBOutlet var timeValueLabel: NSTextField!
+    
+    @IBOutlet var jumpSpaceLabel: NSTextField!
+    @IBOutlet var jumpSpaceSlider: ComponentSlider!
+    @IBOutlet var jumpSpaceSelect: ComponentSelect!
+    @IBOutlet var jumpSpaceValueLabel: NSTextField!
+    
     
     deinit {
         NotificationCenter.default.removeObserver(self)
@@ -64,6 +76,8 @@ class SettingsDisplayView: BaseXibView {
         
         self.setUpHighlight()
         
+        setUpAutoScroll()
+        
         self.reloadData()
     }
     
@@ -99,39 +113,52 @@ class SettingsDisplayView: BaseXibView {
         layoutZoomLabel.textColor = titleLabelColor
         layoutZoomLabel.font = titleLabelFont
         
-        layoutLabel.stringValue = KMLocalizedString("Page Layout:", comment: "")
+        layoutLabel.stringValue = KMLocalizedString("Page Layout:")
         layoutLabel.textColor = subtitleLabelColor
         layoutLabel.font = subtitleLabelFont
         
-        zoomLabel.stringValue = KMLocalizedString("Zoom:", comment: "")
+        zoomLabel.stringValue = KMLocalizedString("Zoom:")
         zoomLabel.textColor = subtitleLabelColor
         zoomLabel.font = subtitleLabelFont
          
-        leftSideLabel.stringValue = KMLocalizedString("Left Side Panel", comment: "")
+        leftSideLabel.stringValue = KMLocalizedString("Left Side Panel")
         leftSideLabel.textColor = titleLabelColor
         leftSideLabel.font = titleLabelFont
         
-        propertyPanelLabel.stringValue = KMLocalizedString("Property Panel", comment: "")
+        propertyPanelLabel.stringValue = KMLocalizedString("Property Panel")
         propertyPanelLabel.textColor = titleLabelColor
         propertyPanelLabel.font = titleLabelFont
         
-        highlightLabel.stringValue = KMLocalizedString("Highlight", comment: "")
+        highlightLabel.stringValue = KMLocalizedString("Highlight")
         highlightLabel.textColor = titleLabelColor
         highlightLabel.font = titleLabelFont
         
+        autoScrolllabel.stringValue = KMLocalizedString("Auto Scroll Options")
+        autoScrolllabel.textColor = titleLabelColor
+        autoScrolllabel.font = titleLabelFont
+        
+        timeLabel.stringValue = KMLocalizedString("Time Interval:")
+        timeLabel.textColor = subtitleLabelColor
+        timeLabel.font = subtitleLabelFont
+        
+        timeValueLabel.stringValue = KMLocalizedString("sec (1~100)")
+        timeValueLabel.textColor = subtitleLabelColor
+        timeValueLabel.font = subtitleLabelFont
+        
+        jumpSpaceLabel.stringValue = KMLocalizedString("Jump Space:")
+        jumpSpaceLabel.textColor = subtitleLabelColor
+        jumpSpaceLabel.font = subtitleLabelFont
+        
+        jumpSpaceValueLabel.stringValue = KMLocalizedString("px (10~1000)")
+        jumpSpaceValueLabel.textColor = subtitleLabelColor
+        jumpSpaceValueLabel.font = subtitleLabelFont
     }
     
     func setUpLayoutAndZoom() {
         
         layoutSelectView.properties = ComponentSelectProperties(size: .s,
                                                                 state: .normal,
-                                                                isDisabled: false,
-                                                                isError: false,
-                                                                leftIcon: false,
-                                                                placeholder: nil,
-                                                                errorText: nil,
-                                                                creatable: false,
-                                                                text: KMLocalizedString("Single Page Continuous", comment: ""))
+                                                                text: KMLocalizedString("Single Page Continuous"))
         if true {
             var menuItemArr: [ComponentMenuitemProperty] = []
             for string in ["Single Page", "Single Page Continuous", "Two Page", "Two Page Continuous",
@@ -140,7 +167,7 @@ class SettingsDisplayView: BaseXibView {
                                                                                         itemSelected: false,
                                                                                         isDisabled: false,
                                                                                         keyEquivalent: nil,
-                                                                                        text: KMLocalizedString(string, comment: ""))
+                                                                                        text: KMLocalizedString(string))
                 if string == " " {
                     itemProperty = ComponentMenuitemProperty.divider()
                 }
@@ -152,13 +179,7 @@ class SettingsDisplayView: BaseXibView {
         
         zoomSelectView.properties = ComponentSelectProperties(size: .s,
                                                               state: .normal,
-                                                              isDisabled: false,
-                                                              isError: false,
-                                                              leftIcon: false,
-                                                              placeholder: nil,
-                                                              errorText: nil,
-                                                              creatable: false,
-                                                              text: KMLocalizedString("Adaptation Width", comment: ""))
+                                                              text: KMLocalizedString("Adaptation Width"))
         if true {
             zoomSelectView.updateMenuItemsArr(KMPDFToolbarConfig.scaleZoomItems())
             zoomSelectView.delegate = self
@@ -281,6 +302,56 @@ class SettingsDisplayView: BaseXibView {
         highlightFormCheckbox.setTarget(self, action: #selector(highlightAction(_:)))
         
     }
+    
+    func setUpAutoScroll() {
+        
+        autoTimeSlider.properties = ComponentSliderProperty(size: .m, percent: 1)
+        autoTimeSlider.delegate = self
+        
+        autoTimeSelect.properties = ComponentSelectProperties(size: .s,
+                                                                state: .normal,
+                                                                text: KMLocalizedString("5"))
+        if true {
+            var menuItemArr: [ComponentMenuitemProperty] = []
+            for string in ["5", "10", "20", "40", "50", "100"] {
+                var itemProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false,
+                                                                                        itemSelected: false,
+                                                                                        isDisabled: false,
+                                                                                        keyEquivalent: nil,
+                                                                                        text: KMLocalizedString(string))
+                if string == " " {
+                    itemProperty = ComponentMenuitemProperty.divider()
+                }
+                menuItemArr.append(itemProperty)
+            }
+            autoTimeSelect.updateMenuItemsArr(menuItemArr)
+            autoTimeSelect.delegate = self
+        }
+        
+        jumpSpaceSlider.properties = ComponentSliderProperty(size: .m, percent: 1)
+        jumpSpaceSlider.delegate = self
+        
+        jumpSpaceSelect.properties = ComponentSelectProperties(size: .s,
+                                                                state: .normal,
+                                                                text: KMLocalizedString("20"))
+        if true {
+            var menuItemArr: [ComponentMenuitemProperty] = []
+            for string in ["10", "50", "100", "200", "500", "1000"] {
+                var itemProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false,
+                                                                                        itemSelected: false,
+                                                                                        isDisabled: false,
+                                                                                        keyEquivalent: nil,
+                                                                                        text: KMLocalizedString(string))
+                if string == " " {
+                    itemProperty = ComponentMenuitemProperty.divider()
+                }
+                menuItemArr.append(itemProperty)
+            }
+            jumpSpaceSelect.updateMenuItemsArr(menuItemArr)
+            jumpSpaceSelect.delegate = self
+        }
+        
+    }
  
     func reloadData() {
         
@@ -334,6 +405,21 @@ class SettingsDisplayView: BaseXibView {
         highlightFormCheckbox.properties.checkboxType = SettingsManager.sharedInstance.highlightFormField ? .selected : .normal
         highlightFormCheckbox.reloadData()
         
+        //Auto Scroll
+        let autoScrollTime: CGFloat = SettingsManager.sharedInstance.autoScrollTimeInterval
+        autoTimeSlider.properties.percent = (autoScrollTime - 1) / (100 - 1)
+        autoTimeSlider.reloadData()
+        
+        autoTimeSelect.properties.text = String(format: "%.0f", autoScrollTime, "%")
+        autoTimeSelect.reloadData()
+        
+        let autoScrollJump: CGFloat = SettingsManager.sharedInstance.autoScrollJumpSpace
+        jumpSpaceSlider.properties.percent = (autoScrollJump - 10) / (1000 - 10)
+        jumpSpaceSlider.reloadData()
+        
+        jumpSpaceSelect.properties.text = String(format: "%.0f", autoScrollJump, "%")
+        jumpSpaceSelect.reloadData()
+        
     }
  
     //MARK: - Action
@@ -375,6 +461,7 @@ class SettingsDisplayView: BaseXibView {
     
 }
 
+//MARK: - ComponentSelectDelegate
 extension SettingsDisplayView: ComponentSelectDelegate {
     func componentSelectDidSelect(view: ComponentSelect?, menuItemProperty: ComponentMenuitemProperty?) {
         if view == layoutSelectView {
@@ -397,3 +484,18 @@ extension SettingsDisplayView: ComponentSelectDelegate {
     
 }
  
+//MARK: - ComponentSliderDelegate
+extension SettingsDisplayView: ComponentSliderDelegate {
+    func componentSliderDidUpdate(_ view: ComponentSlider) {
+        let value = view.properties.percent
+        if view == autoTimeSlider {
+            SettingsManager.sharedInstance.autoScrollTimeInterval = 1 + (100 - 1)*value
+        } else if view == jumpSpaceSlider {
+            SettingsManager.sharedInstance.autoScrollJumpSpace = 10 + (1000 - 10)*value
+        }
+        
+        reloadData()
+    }
+    
+}
+

+ 148 - 8
PDF Office/PDF Master/KMClass/Settings/SettingsDisplayView.xib

@@ -9,6 +9,10 @@
         <customObject id="-2" userLabel="File's Owner" customClass="SettingsDisplayView" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
                 <outlet property="autoExpandPropertyPanelCheckbox" destination="Tfr-FV-tbn" id="EAe-fV-kZp"/>
+                <outlet property="autoScrollView" destination="JHN-pX-GI4" id="1BI-aU-T40"/>
+                <outlet property="autoScrolllabel" destination="QCU-6S-0SO" id="orJ-wQ-U3E"/>
+                <outlet property="autoTimeSelect" destination="fcA-g8-VL5" id="qcz-i1-S8b"/>
+                <outlet property="autoTimeSlider" destination="TVk-Oa-m3s" id="jUj-nj-iyg"/>
                 <outlet property="contendBox" destination="gld-Ys-bvb" id="Q6v-8q-A4c"/>
                 <outlet property="defaultOpenRadio" destination="0wD-eD-gRt" id="dmz-PR-VJk"/>
                 <outlet property="defaultOpenRadioWidthConst" destination="sOU-Oc-Gkz" id="rYp-8m-06E"/>
@@ -21,6 +25,10 @@
                 <outlet property="highlightLinkBoxWidthConst" destination="w3i-k2-Ucp" id="vCQ-Wp-1Jf"/>
                 <outlet property="highlightLinkCheckbox" destination="DOR-kw-RUo" id="Nnf-wr-rDb"/>
                 <outlet property="highlightView" destination="1hb-Hv-az3" id="n7I-ht-pYx"/>
+                <outlet property="jumpSpaceLabel" destination="m4S-4W-Zgq" id="Trp-KT-aWr"/>
+                <outlet property="jumpSpaceSelect" destination="yHm-eN-oqU" id="mi2-e0-tZu"/>
+                <outlet property="jumpSpaceSlider" destination="oOT-pk-9NS" id="ufd-0m-WOA"/>
+                <outlet property="jumpSpaceValueLabel" destination="Lt5-8y-tmw" id="N3j-qw-YfR"/>
                 <outlet property="layoutLabel" destination="PBL-0F-3Km" id="88X-SJ-QCK"/>
                 <outlet property="layoutSelectView" destination="RH1-Xy-gYz" id="VcT-Fl-gE1"/>
                 <outlet property="layoutZoomLabel" destination="xaW-DC-tsp" id="R0S-Fo-tOh"/>
@@ -36,6 +44,8 @@
                 <outlet property="remeberLastRadioWidthConst" destination="LqD-Zi-Ss7" id="NP9-pd-cG3"/>
                 <outlet property="showQuickCheckbox" destination="vaN-3Z-QaJ" id="qCM-oN-qrq"/>
                 <outlet property="showQuickCheckboxWidthConst" destination="B64-ma-pU2" id="9ze-VW-V67"/>
+                <outlet property="timeLabel" destination="qRb-mx-YZh" id="sOW-bA-SfR"/>
+                <outlet property="timeValueLabel" destination="bIr-As-lLv" id="3a6-ZB-M1o"/>
                 <outlet property="zoomLabel" destination="ls6-Op-KS1" id="zac-KL-I0j"/>
                 <outlet property="zoomSelectView" destination="LC8-Ff-7YE" id="TPw-Uw-xt6"/>
             </connections>
@@ -43,17 +53,17 @@
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="640" height="624"/>
+            <rect key="frame" x="0.0" y="0.0" width="640" height="790"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <box boxType="custom" borderWidth="0.0" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="gld-Ys-bvb">
-                    <rect key="frame" x="0.0" y="0.0" width="640" height="624"/>
+                    <rect key="frame" x="0.0" y="0.0" width="640" height="790"/>
                     <view key="contentView" id="PaK-2p-n7o">
-                        <rect key="frame" x="0.0" y="0.0" width="640" height="624"/>
+                        <rect key="frame" x="0.0" y="0.0" width="640" height="790"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="AUZ-JH-o92">
-                                <rect key="frame" x="24" y="504" width="592" height="112"/>
+                                <rect key="frame" x="24" y="670" width="592" height="112"/>
                                 <subviews>
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="K60-Vw-JXV">
                                         <rect key="frame" x="0.0" y="72" width="592" height="40"/>
@@ -121,7 +131,7 @@
                                 </constraints>
                             </customView>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="FLk-kJ-VBb">
-                                <rect key="frame" x="24" y="320" width="592" height="168"/>
+                                <rect key="frame" x="24" y="486" width="592" height="168"/>
                                 <subviews>
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="Px8-zQ-6nQ">
                                         <rect key="frame" x="0.0" y="128" width="592" height="40"/>
@@ -196,7 +206,7 @@
                                 </constraints>
                             </customView>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="IkQ-RL-abt">
-                                <rect key="frame" x="24" y="198" width="592" height="106"/>
+                                <rect key="frame" x="24" y="364" width="592" height="106"/>
                                 <subviews>
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="gce-cI-Ca3">
                                         <rect key="frame" x="0.0" y="66" width="592" height="40"/>
@@ -244,7 +254,7 @@
                                 </constraints>
                             </customView>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="1hb-Hv-az3">
-                                <rect key="frame" x="24" y="78" width="592" height="104"/>
+                                <rect key="frame" x="24" y="244" width="592" height="104"/>
                                 <subviews>
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="du7-5h-cT8">
                                         <rect key="frame" x="0.0" y="64" width="592" height="40"/>
@@ -291,14 +301,144 @@
                                     <constraint firstItem="qSm-6l-gzy" firstAttribute="top" secondItem="DOR-kw-RUo" secondAttribute="bottom" id="vzJ-45-ZNc"/>
                                 </constraints>
                             </customView>
+                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="JHN-pX-GI4">
+                                <rect key="frame" x="24" y="116" width="592" height="112"/>
+                                <subviews>
+                                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="SV9-4I-cla">
+                                        <rect key="frame" x="0.0" y="72" width="592" height="40"/>
+                                        <subviews>
+                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="QCU-6S-0SO">
+                                                <rect key="frame" x="-2" y="12" width="121" height="16"/>
+                                                <textFieldCell key="cell" lineBreakMode="clipping" title="Auto Scroll Options" id="2Vt-ee-TIQ">
+                                                    <font key="font" usesAppearanceFont="YES"/>
+                                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                    <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                </textFieldCell>
+                                            </textField>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="40" id="LrN-Yg-zya"/>
+                                            <constraint firstItem="QCU-6S-0SO" firstAttribute="centerY" secondItem="SV9-4I-cla" secondAttribute="centerY" id="Ohz-85-yvA"/>
+                                            <constraint firstItem="QCU-6S-0SO" firstAttribute="leading" secondItem="SV9-4I-cla" secondAttribute="leading" id="cGb-J4-IsP"/>
+                                        </constraints>
+                                    </customView>
+                                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="4wr-1W-hqc">
+                                        <rect key="frame" x="0.0" y="40" width="592" height="32"/>
+                                        <subviews>
+                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qRb-mx-YZh">
+                                                <rect key="frame" x="-2" y="8" width="86" height="16"/>
+                                                <textFieldCell key="cell" lineBreakMode="clipping" title="Time Interval:" id="R0f-GM-jD1">
+                                                    <font key="font" usesAppearanceFont="YES"/>
+                                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                    <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                </textFieldCell>
+                                            </textField>
+                                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="TVk-Oa-m3s" customClass="ComponentSlider" customModule="KMComponentLibrary">
+                                                <rect key="frame" x="90" y="0.0" width="264" height="32"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="264" id="KwG-Jw-FMB"/>
+                                                    <constraint firstAttribute="height" constant="32" id="kGC-3e-UHS"/>
+                                                </constraints>
+                                            </customView>
+                                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="fcA-g8-VL5" customClass="ComponentSelect" customModule="KMComponentLibrary">
+                                                <rect key="frame" x="370" y="0.0" width="80" height="32"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="height" constant="32" id="JVh-rn-hOT"/>
+                                                    <constraint firstAttribute="width" constant="80" id="ksL-E2-vYC"/>
+                                                </constraints>
+                                            </customView>
+                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bIr-As-lLv">
+                                                <rect key="frame" x="456" y="8" width="75" height="16"/>
+                                                <textFieldCell key="cell" lineBreakMode="clipping" title="sec (1~100)" id="bEM-ir-7kn">
+                                                    <font key="font" usesAppearanceFont="YES"/>
+                                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                    <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                </textFieldCell>
+                                            </textField>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstItem="bIr-As-lLv" firstAttribute="centerY" secondItem="4wr-1W-hqc" secondAttribute="centerY" id="9be-uJ-f7z"/>
+                                            <constraint firstItem="TVk-Oa-m3s" firstAttribute="centerY" secondItem="4wr-1W-hqc" secondAttribute="centerY" id="Mvm-o0-Xf8"/>
+                                            <constraint firstItem="bIr-As-lLv" firstAttribute="leading" secondItem="fcA-g8-VL5" secondAttribute="trailing" constant="8" id="P3C-vT-mMO"/>
+                                            <constraint firstItem="qRb-mx-YZh" firstAttribute="centerY" secondItem="4wr-1W-hqc" secondAttribute="centerY" id="R4d-a8-jAf"/>
+                                            <constraint firstItem="fcA-g8-VL5" firstAttribute="centerY" secondItem="4wr-1W-hqc" secondAttribute="centerY" id="Sgj-O9-JAa"/>
+                                            <constraint firstItem="fcA-g8-VL5" firstAttribute="leading" secondItem="TVk-Oa-m3s" secondAttribute="trailing" constant="16" id="o9S-qw-Xbp"/>
+                                            <constraint firstItem="TVk-Oa-m3s" firstAttribute="leading" secondItem="qRb-mx-YZh" secondAttribute="trailing" constant="8" id="tCI-ac-3zN"/>
+                                            <constraint firstAttribute="height" constant="32" id="yox-hm-tr0"/>
+                                            <constraint firstItem="qRb-mx-YZh" firstAttribute="leading" secondItem="4wr-1W-hqc" secondAttribute="leading" id="zc5-lf-RqN"/>
+                                        </constraints>
+                                    </customView>
+                                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="nbY-EJ-goB">
+                                        <rect key="frame" x="0.0" y="0.0" width="592" height="32"/>
+                                        <subviews>
+                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="m4S-4W-Zgq">
+                                                <rect key="frame" x="-2" y="8" width="83" height="16"/>
+                                                <textFieldCell key="cell" lineBreakMode="clipping" title="Jump Space:" id="Lag-dg-u9N">
+                                                    <font key="font" usesAppearanceFont="YES"/>
+                                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                    <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                </textFieldCell>
+                                            </textField>
+                                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="oOT-pk-9NS" customClass="ComponentSlider" customModule="KMComponentLibrary">
+                                                <rect key="frame" x="87" y="0.0" width="264" height="32"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="height" constant="32" id="8bd-Er-C8H"/>
+                                                    <constraint firstAttribute="width" constant="264" id="WhY-kM-beA"/>
+                                                </constraints>
+                                            </customView>
+                                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="yHm-eN-oqU" customClass="ComponentSelect" customModule="KMComponentLibrary">
+                                                <rect key="frame" x="367" y="0.0" width="80" height="32"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="80" id="RrX-NR-JFg"/>
+                                                    <constraint firstAttribute="height" constant="32" id="Z4e-1F-ziW"/>
+                                                </constraints>
+                                            </customView>
+                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Lt5-8y-tmw">
+                                                <rect key="frame" x="453" y="8" width="85" height="16"/>
+                                                <textFieldCell key="cell" lineBreakMode="clipping" title="px (10~1000)" id="2Bf-CS-Zc3">
+                                                    <font key="font" usesAppearanceFont="YES"/>
+                                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                    <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                </textFieldCell>
+                                            </textField>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstItem="m4S-4W-Zgq" firstAttribute="leading" secondItem="nbY-EJ-goB" secondAttribute="leading" id="41H-Dp-vBd"/>
+                                            <constraint firstAttribute="height" constant="32" id="KiB-jc-ToD"/>
+                                            <constraint firstItem="Lt5-8y-tmw" firstAttribute="centerY" secondItem="nbY-EJ-goB" secondAttribute="centerY" id="N7e-Hx-BtF"/>
+                                            <constraint firstItem="yHm-eN-oqU" firstAttribute="centerY" secondItem="nbY-EJ-goB" secondAttribute="centerY" id="RLP-HW-YL0"/>
+                                            <constraint firstItem="yHm-eN-oqU" firstAttribute="leading" secondItem="oOT-pk-9NS" secondAttribute="trailing" constant="16" id="SlF-OK-DjH"/>
+                                            <constraint firstItem="m4S-4W-Zgq" firstAttribute="centerY" secondItem="nbY-EJ-goB" secondAttribute="centerY" id="ZAG-Y3-plX"/>
+                                            <constraint firstItem="oOT-pk-9NS" firstAttribute="leading" secondItem="m4S-4W-Zgq" secondAttribute="trailing" constant="8" id="feO-vj-HaK"/>
+                                            <constraint firstItem="oOT-pk-9NS" firstAttribute="centerY" secondItem="nbY-EJ-goB" secondAttribute="centerY" id="g6k-Iz-nWb"/>
+                                            <constraint firstItem="Lt5-8y-tmw" firstAttribute="leading" secondItem="yHm-eN-oqU" secondAttribute="trailing" constant="8" id="rIz-Tu-eRX"/>
+                                        </constraints>
+                                    </customView>
+                                </subviews>
+                                <constraints>
+                                    <constraint firstItem="4wr-1W-hqc" firstAttribute="leading" secondItem="JHN-pX-GI4" secondAttribute="leading" id="62j-jb-dkZ"/>
+                                    <constraint firstAttribute="width" constant="592" id="EKK-JC-0fO"/>
+                                    <constraint firstItem="SV9-4I-cla" firstAttribute="leading" secondItem="JHN-pX-GI4" secondAttribute="leading" id="Jbx-LG-aT7"/>
+                                    <constraint firstAttribute="trailing" secondItem="4wr-1W-hqc" secondAttribute="trailing" id="LAJ-YR-e0b"/>
+                                    <constraint firstItem="4wr-1W-hqc" firstAttribute="top" secondItem="SV9-4I-cla" secondAttribute="bottom" id="O8c-0d-cGd"/>
+                                    <constraint firstItem="nbY-EJ-goB" firstAttribute="leading" secondItem="JHN-pX-GI4" secondAttribute="leading" id="bkm-Mz-2oQ"/>
+                                    <constraint firstItem="nbY-EJ-goB" firstAttribute="top" secondItem="4wr-1W-hqc" secondAttribute="bottom" constant="8" id="kSu-E9-J0t"/>
+                                    <constraint firstAttribute="trailing" secondItem="SV9-4I-cla" secondAttribute="trailing" id="lcv-IA-jpq"/>
+                                    <constraint firstItem="SV9-4I-cla" firstAttribute="top" secondItem="JHN-pX-GI4" secondAttribute="top" id="vvR-64-EVY"/>
+                                    <constraint firstAttribute="trailing" secondItem="nbY-EJ-goB" secondAttribute="trailing" id="xSW-ho-bbW"/>
+                                    <constraint firstAttribute="height" constant="112" id="y7x-Xx-g4T"/>
+                                </constraints>
+                            </customView>
                         </subviews>
                         <constraints>
                             <constraint firstItem="FLk-kJ-VBb" firstAttribute="leading" secondItem="PaK-2p-n7o" secondAttribute="leading" constant="24" id="53H-WI-McX"/>
                             <constraint firstItem="AUZ-JH-o92" firstAttribute="leading" secondItem="PaK-2p-n7o" secondAttribute="leading" constant="24" id="MO1-EA-0as"/>
                             <constraint firstItem="FLk-kJ-VBb" firstAttribute="top" secondItem="AUZ-JH-o92" secondAttribute="bottom" constant="16" id="Pe3-0k-ekx"/>
                             <constraint firstItem="1hb-Hv-az3" firstAttribute="top" secondItem="IkQ-RL-abt" secondAttribute="bottom" constant="16" id="QG5-9x-WQr"/>
+                            <constraint firstItem="JHN-pX-GI4" firstAttribute="top" secondItem="1hb-Hv-az3" secondAttribute="bottom" constant="16" id="YUT-9n-ik6"/>
                             <constraint firstItem="AUZ-JH-o92" firstAttribute="top" secondItem="PaK-2p-n7o" secondAttribute="top" constant="8" id="cnE-qX-mrS"/>
                             <constraint firstItem="1hb-Hv-az3" firstAttribute="leading" secondItem="PaK-2p-n7o" secondAttribute="leading" constant="24" id="eiY-cx-ags"/>
+                            <constraint firstItem="JHN-pX-GI4" firstAttribute="leading" secondItem="PaK-2p-n7o" secondAttribute="leading" constant="24" id="i18-QJ-6Ah"/>
                             <constraint firstItem="IkQ-RL-abt" firstAttribute="top" secondItem="FLk-kJ-VBb" secondAttribute="bottom" constant="16" id="nxu-CX-LhN"/>
                             <constraint firstItem="IkQ-RL-abt" firstAttribute="leading" secondItem="PaK-2p-n7o" secondAttribute="leading" constant="24" id="o1Q-a0-vLv"/>
                         </constraints>
@@ -311,7 +451,7 @@
                 <constraint firstItem="gld-Ys-bvb" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="aby-yk-j9Q"/>
                 <constraint firstAttribute="bottom" secondItem="gld-Ys-bvb" secondAttribute="bottom" id="eBt-Vo-VpW"/>
             </constraints>
-            <point key="canvasLocation" x="132" y="-72"/>
+            <point key="canvasLocation" x="132" y="11"/>
         </customView>
     </objects>
 </document>

+ 21 - 0
PDF Office/PDF Master/KMClass/Settings/SettingsManager.swift

@@ -106,6 +106,9 @@ var settingsShowQuickActionBarKey  = "settingsShowQuickActionBarKey"
 
 var settingsHighlightLinkKey       = "settingsHighlightLinkKey"
 var settingsHighlightFormFieldKey  = "settingsHighlightFormFieldKey"
+ 
+var autoScrollTimeIntervalKey  = "autoScrollTimeIntervalKey"
+var autoScrollJumpSpaceKey  = "autoScrollJumpSpaceKey"
 
 class SettingsManager: NSObject {
     
@@ -153,6 +156,19 @@ class SettingsManager: NSObject {
         self.highlightLink = UserDefaults.standard.bool(forKey: settingsHighlightLinkKey)
         self.highlightFormField = UserDefaults.standard.bool(forKey: settingsHighlightFormFieldKey)
         
+        let autoScrollTimeInterval = UserDefaults.standard.float(forKey: autoScrollTimeIntervalKey)
+        if autoScrollTimeInterval > 5 {
+            self.autoScrollTimeInterval = autoScrollTimeInterval.cgFloat
+        } else {
+            self.autoScrollTimeInterval = 5
+        }
+        
+        let autoScrollJumpSpace = UserDefaults.standard.float(forKey: autoScrollJumpSpaceKey)
+        if autoScrollJumpSpace > 10 {
+            self.autoScrollJumpSpace = autoScrollJumpSpace.cgFloat
+        } else {
+            self.autoScrollJumpSpace = 20
+        }
     }
     
     func saveData() {
@@ -176,6 +192,8 @@ class SettingsManager: NSObject {
         UserDefaults.standard.setValue(showQuickActionBar, forKey: settingsShowQuickActionBarKey)
         UserDefaults.standard.setValue(highlightLink, forKey: settingsHighlightLinkKey)
         UserDefaults.standard.setValue(highlightFormField, forKey: settingsHighlightFormFieldKey)
+        UserDefaults.standard.setValue(autoScrollTimeInterval, forKey: autoScrollTimeIntervalKey)
+        UserDefaults.standard.setValue(autoScrollJumpSpace, forKey: autoScrollJumpSpaceKey)
         
     }
     
@@ -286,6 +304,9 @@ class SettingsManager: NSObject {
         }
     }
     
+    var autoScrollTimeInterval: CGFloat = 5
+    var autoScrollJumpSpace: CGFloat = 20
+    
     //MARK: - Reset
     func resetDefaultData() {
         self.resetGeneralData()

+ 0 - 16
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -1931,12 +1931,6 @@
 		ADF1569C29A63CBF001D1018 /* KMLightMember.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ADF1569B29A63CBF001D1018 /* KMLightMember.xcassets */; };
 		ADF1569D29A63CBF001D1018 /* KMLightMember.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ADF1569B29A63CBF001D1018 /* KMLightMember.xcassets */; };
 		ADF1569E29A63CBF001D1018 /* KMLightMember.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ADF1569B29A63CBF001D1018 /* KMLightMember.xcassets */; };
-		ADFA8EFD2B5649AE002595A4 /* KMAutoFlowOptionsSheetController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADFA8EFB2B5649AE002595A4 /* KMAutoFlowOptionsSheetController.swift */; };
-		ADFA8EFE2B5649AE002595A4 /* KMAutoFlowOptionsSheetController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADFA8EFB2B5649AE002595A4 /* KMAutoFlowOptionsSheetController.swift */; };
-		ADFA8EFF2B5649AE002595A4 /* KMAutoFlowOptionsSheetController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADFA8EFB2B5649AE002595A4 /* KMAutoFlowOptionsSheetController.swift */; };
-		ADFA8F002B5649AE002595A4 /* KMAutoFlowOptionsSheetController.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADFA8EFC2B5649AE002595A4 /* KMAutoFlowOptionsSheetController.xib */; };
-		ADFA8F012B5649AE002595A4 /* KMAutoFlowOptionsSheetController.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADFA8EFC2B5649AE002595A4 /* KMAutoFlowOptionsSheetController.xib */; };
-		ADFA8F022B5649AE002595A4 /* KMAutoFlowOptionsSheetController.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADFA8EFC2B5649AE002595A4 /* KMAutoFlowOptionsSheetController.xib */; };
 		ADFA8F042B5666B6002595A4 /* KMAotuFlowExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADFA8F032B5666B6002595A4 /* KMAotuFlowExtension.swift */; };
 		ADFA8F052B5666B6002595A4 /* KMAotuFlowExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADFA8F032B5666B6002595A4 /* KMAotuFlowExtension.swift */; };
 		ADFA8F062B5666B6002595A4 /* KMAotuFlowExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADFA8F032B5666B6002595A4 /* KMAotuFlowExtension.swift */; };
@@ -5228,8 +5222,6 @@
 		ADEC7A7D299397F8009A8256 /* SF-Pro-Text-Semibold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-Pro-Text-Semibold.otf"; sourceTree = "<group>"; };
 		ADED71DC29B57C01005EEC0A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
 		ADF1569B29A63CBF001D1018 /* KMLightMember.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = KMLightMember.xcassets; sourceTree = "<group>"; };
-		ADFA8EFB2B5649AE002595A4 /* KMAutoFlowOptionsSheetController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMAutoFlowOptionsSheetController.swift; sourceTree = "<group>"; };
-		ADFA8EFC2B5649AE002595A4 /* KMAutoFlowOptionsSheetController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMAutoFlowOptionsSheetController.xib; sourceTree = "<group>"; };
 		ADFA8F032B5666B6002595A4 /* KMAotuFlowExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMAotuFlowExtension.swift; sourceTree = "<group>"; };
 		ADFA8F082B579945002595A4 /* KMSearchFindView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMSearchFindView.swift; sourceTree = "<group>"; };
 		ADFA8F0C2B579957002595A4 /* KMSearchFindView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMSearchFindView.xib; sourceTree = "<group>"; };
@@ -7790,8 +7782,6 @@
 			isa = PBXGroup;
 			children = (
 				ADFA8F032B5666B6002595A4 /* KMAotuFlowExtension.swift */,
-				ADFA8EFB2B5649AE002595A4 /* KMAutoFlowOptionsSheetController.swift */,
-				ADFA8EFC2B5649AE002595A4 /* KMAutoFlowOptionsSheetController.xib */,
 			);
 			path = AutoFlow;
 			sourceTree = "<group>";
@@ -12662,7 +12652,6 @@
 				AD1D480B2AFB18DA007AC1F0 /* KMCompressWindowController.xib in Resources */,
 				9F1F82DD292F84D60092C4B4 /* KMHomeInsertActionViewController.xib in Resources */,
 				9F3D818A29A0A9A70087B5AD /* KMDesignButton.xib in Resources */,
-				ADFA8F002B5649AE002595A4 /* KMAutoFlowOptionsSheetController.xib in Resources */,
 				BB6EA2A32B70B8F2000D4490 /* KMConvertComparePayViewController.xib in Resources */,
 				BB8810972B4F7CD100AFA63E /* KMVerificationTrialViewController.xib in Resources */,
 				ADE614B129779C6D00F62ED7 /* KMImageTitleButton.xib in Resources */,
@@ -13145,7 +13134,6 @@
 				BB0FE03B2B734DD1001E0F88 /* AITipIconView.xib in Resources */,
 				BB2EDF74296ECE17003BCF58 /* KMPageEditThumbnailItem.xib in Resources */,
 				BB19A7472CB7B7A0008204DC /* KMHomeFilesHeaderView.xib in Resources */,
-				ADFA8F012B5649AE002595A4 /* KMAutoFlowOptionsSheetController.xib in Resources */,
 				BB5BE4F22B060EB500D51BF2 /* KMLanguageViewController.xib in Resources */,
 				BBA2109129ACBFDB00E6B346 /* nosign.pdf in Resources */,
 				ADD1B6AF2941E97F00C3FFF7 /* KMPrintWindowController.xib in Resources */,
@@ -13617,7 +13605,6 @@
 				BBFDDDAF2CCA6AB200FA4FDB /* ComponentGroupItem.nib in Resources */,
 				BBCB9EAB2CCDF65000563AC8 /* KMNDisplayViewController.xib in Resources */,
 				ADBC2D17299CCD10006280C8 /* KMTextfieldButton.xib in Resources */,
-				ADFA8F022B5649AE002595A4 /* KMAutoFlowOptionsSheetController.xib in Resources */,
 				BB8810992B4F7CD100AFA63E /* KMVerificationTrialViewController.xib in Resources */,
 				BB6EA2A52B70B8F2000D4490 /* KMConvertComparePayViewController.xib in Resources */,
 				ADD1B6D129431D7100C3FFF7 /* KMPrintPreviewView.xib in Resources */,
@@ -14313,7 +14300,6 @@
 				ADE86A9D2B031FDB00414DFA /* KMCompareWindowController.swift in Sources */,
 				BB031B8E2C47CEFA0099F7AD /* KMUserFeekbackHanddler.swift in Sources */,
 				BBCE57142A72713A00508EFC /* NSViewController+KMExtension.swift in Sources */,
-				ADFA8EFD2B5649AE002595A4 /* KMAutoFlowOptionsSheetController.swift in Sources */,
 				655B91B42CCB47420080AE6E /* KMNPreView.swift in Sources */,
 				BB162E97295062CD0088E9D1 /* KMPageRangeTools.swift in Sources */,
 				BB24FFDD2B28578C00A59054 /* KMTTSWindowController.swift in Sources */,
@@ -15505,7 +15491,6 @@
 				ADDF83422B391A5C00A81A4E /* DSignatureConfigWindowController.swift in Sources */,
 				AD055E7F2B88294F0035F824 /* SKBookmarkSheetController.m in Sources */,
 				BB88E43C294023CB002B3655 /* KMDocumentModel.swift in Sources */,
-				ADFA8EFE2B5649AE002595A4 /* KMAutoFlowOptionsSheetController.swift in Sources */,
 				BBE412C22D12A3410069A661 /* KMRedactToolbarController.swift in Sources */,
 				BBDE52BC2BF3676C000545B2 /* KMPresentTableViewCell.swift in Sources */,
 				AD8E48DA2D1BE54F0055D3E6 /* KMOCRProgressView.swift in Sources */,
@@ -16110,7 +16095,6 @@
 				ADDDCE232B43A32A005B4AB5 /* AppSandboxFileAccessPersist.m in Sources */,
 				AD199DFA2B26A36500D56FEE /* KMPrintPosterPreviewView.swift in Sources */,
 				BB9AEB3F2D0FC9C4004BF8D2 /* FormsListController.swift in Sources */,
-				ADFA8EFF2B5649AE002595A4 /* KMAutoFlowOptionsSheetController.swift in Sources */,
 				BB88109C2B4F7CD100AFA63E /* KMVerificationTrialViewController.m in Sources */,
 				BB42937C2D030BE3007ECFF2 /* KMCreateStampWindowController.swift in Sources */,
 				BB2EDF6C296ECE17003BCF58 /* KMPageEditInsertTypeItemView.swift in Sources */,